fix(native): report SSO sign-in failures

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jakeandClaude Sonnet 5.5 committed 2026-10-05 22:03:06 -04:00
1 parent 8a6c32f376
commit 669fc74653
13 files changed
+133 -9

No files matched your search

+37 -9
View File
@@ -73,6 +73,34 @@ export default function LoginScreen() {
const isSubmitting = useStore(form.store, (s) => s.isSubmitting);
const busy = isSubmitting || isSignedIn;
const [isSsoPending, setSsoPending] = useState(false);
const signInWithSso = async () => {
if (isSsoPending) return;
setSsoPending(true);
try {
const result = await authClient.signIn.social({
provider: "oidc",
callbackURL: "/(tabs)/(home)",
// Same prefix as callbackURL so the auth session also closes on failure (Android matches by prefix).
errorCallbackURL: "/(tabs)/(home)",
});
if (result.error) {
toast.error(getAuthErrorMessage(result.error, t`Couldn't start sign-in`));
return;
}
// The Expo plugin stores the session cookie when the browser returns successfully; if no
// session appeared, the flow was cancelled or failed at the provider.
const session = await authClient.getSession();
if (!session.data) {
toast.error(t`Sign-in didn't complete`);
}
} catch {
toast.error(t`Couldn't start sign-in`);
} finally {
setSsoPending(false);
}
};
const statusCompletedColor = useCSSVariable("--color-status-completed") as string;
const serverHost = splitUrl(getServerUrl()).host;
@@ -99,18 +127,18 @@ export default function LoginScreen() {
return (
<Animated.View entering={FadeInDown.duration(300).delay(100)} className="mb-4">
<Button
onPress={() => {
authClient.signIn.social({
provider: "oidc",
callbackURL: "/(tabs)/(home)",
});
}}
onPress={() => void signInWithSso()}
disabled={busy || isSsoPending}
variant="secondary"
className="w-full"
>
<ButtonLabel>
<Trans>Sign in with {providerName}</Trans>
</ButtonLabel>
{isSsoPending ? (
<Spinner size="sm" />
) : (
<ButtonLabel>
<Trans>Sign in with {providerName}</Trans>
</ButtonLabel>
)}
</Button>
{showPasswordLogin && (
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "الإبلاغ عن الأعطال"
@@ -3191,6 +3195,10 @@ msgstr "تسجيل الخروج"
msgid "Sign out of other sessions"
msgstr "تسجيل الخروج من الجلسات الأخرى"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "تخطي في الوقت الحالي"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Absturzberichte"
@@ -3191,6 +3195,10 @@ msgstr "Abmelden"
msgid "Sign out of other sessions"
msgstr "Von anderen Sitzungen abmelden"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Vorerst überspringen"
+8
View File
@@ -887,6 +887,10 @@ msgstr "Couldn't load your watch history"
msgid "Couldn't search right now"
msgstr "Couldn't search right now"
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr "Couldn't start sign-in"
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Crash reporting"
@@ -3191,6 +3195,10 @@ msgstr ""
msgid "Sign out of other sessions"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr "Sign-in didn't complete"
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Skip for now"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Informe de fallos"
@@ -3191,6 +3195,10 @@ msgstr "Cerrar sesión"
msgid "Sign out of other sessions"
msgstr "Cerrar otras sesiones"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Omitir por ahora"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Signalement de plantages"
@@ -3191,6 +3195,10 @@ msgstr "Se déconnecter"
msgid "Sign out of other sessions"
msgstr "Se déconnecter des autres sessions"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Passer pour l'instant"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "דיווח על קריסות"
@@ -3191,6 +3195,10 @@ msgstr "התנתק"
msgid "Sign out of other sessions"
msgstr "התנתק משאר ההפעלות"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "דלג לעת עתה"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Segnalazione degli arresti anomali"
@@ -3191,6 +3195,10 @@ msgstr "Esci"
msgid "Sign out of other sessions"
msgstr "Esci dalle altre sessioni"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Salta per ora"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "クラッシュレポート"
@@ -3191,6 +3195,10 @@ msgstr "サインアウト"
msgid "Sign out of other sessions"
msgstr "他のセッションからサインアウト"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "今はスキップ"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "충돌 보고"
@@ -3191,6 +3195,10 @@ msgstr "로그아웃"
msgid "Sign out of other sessions"
msgstr "다른 세션에서 로그아웃"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "지금은 건너뛰기"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Crashrapportage"
@@ -3191,6 +3195,10 @@ msgstr "Afmelden"
msgid "Sign out of other sessions"
msgstr "Andere sessies afmelden"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Nu overslaan"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "Relatório de falhas"
@@ -3191,6 +3195,10 @@ msgstr "Sair"
msgid "Sign out of other sessions"
msgstr "Sair de outras sessões"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "Ignorar por agora"
+8
View File
@@ -887,6 +887,10 @@ msgstr ""
msgid "Couldn't search right now"
msgstr ""
#: apps/native/src/app/(auth)/login.tsx
msgid "Couldn't start sign-in"
msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Crash reporting"
msgstr "崩溃报告"
@@ -3191,6 +3195,10 @@ msgstr "退出登录"
msgid "Sign out of other sessions"
msgstr "退出其他会话"
#: apps/native/src/app/(auth)/login.tsx
msgid "Sign-in didn't complete"
msgstr ""
#: apps/web/src/routes/_app/onboarding.tsx
msgid "Skip for now"
msgstr "暂时跳过"