fix(auth): never enable dev login on production deployments#91
Merged
Conversation
- docs/SETUP.md: correct RESUME_PARSE_MODE default (queue, not queue-and-inline) and document JOB_RUNNER=inline behavior without workers - sign-in.test.ts: regression test proving lookalike/subdomain emails are rejected by the AUTH_ALLOWED_EMAIL_DOMAIN gate (endsWith(@ + domain) anchors on the @ separator, so no bypass exists) - dispatch.test.ts: test documenting that inline admin fan-out is fire-and-forget — send failures land in EmailLog, not the returned result
The dev credentials provider (any email -> ADMIN) was registered whenever Google OAuth credentials were missing, which left admin sign-in wide open on deployments without AUTH_GOOGLE_* set. It is now restricted to NODE_ENV=development, with an explicit ALLOW_DEV_LOGIN=1 escape hatch for local production-build smoke tests. Also on the signin page: - hide the Google button when OAuth is not configured (clicking it previously bounced through /api/auth/signin back to /signin with no feedback - the reported refresh loop) - surface NextAuth ?error= codes as a visible alert - show a clear notice when no sign-in method is available And accept .txt resumes end-to-end (upload guard, schema message, file input accept list); text extraction and inline preview already support plain text. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- Add loading.tsx fallbacks for every admin segment (shared AdminPageSkeleton), the public careers job page, and the root job board, so navigation shows immediate skeleton/branded loading states instead of a frozen screen while server components stream. - Add a shadcn-style Skeleton primitive. - RescoreButton: surface success/error via toast (failures were silently swallowed); RetryParsingButton: toast on success/failure in addition to the inline error text. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NODE_ENV=development, with an explicitALLOW_DEV_LOGIN=1escape hatch for local prod-build smoke tests.?error=codes now render as a visible alert, and a clear notice shows when no sign-in method is available..txtuploads end-to-end (upload guard, schema message, accept attr). Extraction and inline preview already supported plain text.Test plan
pnpm lint/pnpm typecheck/pnpm vitest run(196/196) /pnpm buildauth.config.test.tsProduction follow-up
After merge + promote to master, set
AUTH_GOOGLE_ID,AUTH_GOOGLE_SECRET,RESEND_API_KEY,EMAIL_FROMin Vercel production env and add the prod redirect URI in GCP.🤖 Generated with Claude Code