Stabilize mobile auth session handling
This commit is contained in:
@@ -81,11 +81,16 @@ export default function RegisterScreen() {
|
||||
const session = await authClient.getSession();
|
||||
const user = session.data?.user;
|
||||
if (user) {
|
||||
await completeSignInAfterAuth(authClient, {
|
||||
const completed = await completeSignInAfterAuth(authClient, {
|
||||
apiUrl,
|
||||
activeAccountId,
|
||||
registerAccount: saveAccount,
|
||||
});
|
||||
if (!completed) {
|
||||
setError("Account created but session setup failed. Try signing in.");
|
||||
}
|
||||
} else {
|
||||
setError("Account created. Sign in with your email and password.");
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : "Registration failed");
|
||||
|
||||
Reference in New Issue
Block a user