From 1ce2d1583ffc8dd370ba9cff5a547712d57b0d8e Mon Sep 17 00:00:00 2001 From: Will Baumbach Date: Wed, 6 Aug 2025 22:07:51 -0500 Subject: [PATCH] sign in and sign up flow working - sign up is a little janky i will probably switch to a code based verification --- app/(auth)/sign-in.tsx | 2 +- app/(auth)/sign-up.tsx | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/(auth)/sign-in.tsx b/app/(auth)/sign-in.tsx index b06e3da..a0d82b1 100644 --- a/app/(auth)/sign-in.tsx +++ b/app/(auth)/sign-in.tsx @@ -48,7 +48,7 @@ export default function LoginScreen() { > Login - Don't have an account? + Don't have an account? { diff --git a/app/(auth)/sign-up.tsx b/app/(auth)/sign-up.tsx index b085e4e..6ef0437 100644 --- a/app/(auth)/sign-up.tsx +++ b/app/(auth)/sign-up.tsx @@ -15,17 +15,25 @@ export default function SignUpScreen() { try { // Start Auth - await signUp.create({ + const signUpAttempt = await signUp.create({ firstName: fname, lastName: lname, emailAddress: email, password }) + // Set confirmation - await signUp.prepareEmailAddressVerification({ + await signUp.prepareVerification({ strategy: 'email_link', redirectUrl: '/' }) + + if (signUpAttempt.status === 'complete') { + setActive({ session: signUpAttempt.createdSessionId }) + router.replace('/') + } else { + console.log(signUpAttempt) + } } catch (e) { console.log(JSON.stringify(e)) }