Skip to content

Commit 973d834

Browse files
authored
fix: authenticator uses connectionSessionStorage for errors (#755)
1 parent ea51aa1 commit 973d834

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/routes/_auth+/onboarding_.$provider.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
signupWithConnection,
3131
requireAnonymous,
3232
} from '#app/utils/auth.server.ts'
33+
import { connectionSessionStorage } from '#app/utils/connections.server'
3334
import { ProviderNameSchema } from '#app/utils/connections.tsx'
3435
import { prisma } from '#app/utils/db.server.ts'
3536
import { useIsPending } from '#app/utils/misc.tsx'
@@ -83,15 +84,15 @@ async function requireData({
8384

8485
export async function loader({ request, params }: LoaderFunctionArgs) {
8586
const { email } = await requireData({ request, params })
86-
const authSession = await authSessionStorage.getSession(
87+
const connectionSession = await connectionSessionStorage.getSession(
8788
request.headers.get('cookie'),
8889
)
8990
const verifySession = await verifySessionStorage.getSession(
9091
request.headers.get('cookie'),
9192
)
9293
const prefilledProfile = verifySession.get(prefilledProfileKey)
9394

94-
const formError = authSession.get(authenticator.sessionErrorKey)
95+
const formError = connectionSession.get(authenticator.sessionErrorKey)
9596
const hasError = typeof formError === 'string'
9697

9798
return json({

0 commit comments

Comments
 (0)