sign in and sign up flow working - sign up is a little janky i will probably switch to a code based verification

This commit is contained in:
Will Baumbach
2025-08-06 22:07:51 -05:00
parent fa0763df47
commit 1ce2d1583f
2 changed files with 11 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ export default function LoginScreen() {
>
<Text style={{ color: '#fff', fontWeight: 'bold' }}>Login</Text>
</TouchableOpacity>
<Text style={styles.textCenter}>Don't have an account?</Text>
<Text style={styles.textCenter}>Don&apos;t have an account?</Text>
<TouchableOpacity
style={styles.signup}
onPress={() => {

View File

@@ -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))
}