edcde8b34a
signIn.email() resolves with error: null and data.twoFactorRedirect: true
for 2FA-enabled accounts — no full session exists yet. The login page's
handleSubmit treated any non-error response as fully signed in and called
router.push("/recipes"), racing better-auth's own window.location.href
redirect to /verify-2fa (twoFactorClient's onSuccess hook). When the app's
push won that race, middleware bounced the unauthenticated /recipes
request straight back to /login with no error surfaced — looked like the
page just reloaded.
Now explicitly skips the /recipes push when twoFactorRedirect is set,
leaving the SDK's own redirect to run uncontested.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
24 lines
632 B
JSON
24 lines
632 B
JSON
{
|
|
"name": "epicure",
|
|
"version": "0.50.1",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "pnpm --filter web dev",
|
|
"build": "pnpm --filter web build",
|
|
"lint": "pnpm -r lint",
|
|
"typecheck": "pnpm -r typecheck",
|
|
"db:generate": "pnpm --filter @epicure/db generate",
|
|
"db:migrate": "pnpm --filter @epicure/db migrate",
|
|
"db:seed": "pnpm --filter @epicure/db seed",
|
|
"db:backfill-usernames": "pnpm --filter @epicure/db backfill-usernames",
|
|
"db:studio": "pnpm --filter @epicure/db studio"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^5.8.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=22",
|
|
"pnpm": ">=11"
|
|
}
|
|
}
|