From 48e9438d19d373f4729397115b2c3f0c4c1c6b35 Mon Sep 17 00:00:00 2001 From: mrevanzak Date: Sat, 2 Dec 2023 11:29:49 +0700 Subject: [PATCH] fix(expo): error on signin --- apps/expo/src/components/SignInButton.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/expo/src/components/SignInButton.tsx b/apps/expo/src/components/SignInButton.tsx index d93c398..68b90e3 100644 --- a/apps/expo/src/components/SignInButton.tsx +++ b/apps/expo/src/components/SignInButton.tsx @@ -17,9 +17,14 @@ export default function SignInButton() { const handleSignInWithDiscordPress = React.useCallback(async () => { try { - const { createdSessionId, setActive } = await startOAuthFlow(); + const { createdSessionId, setActive, authSessionResult } = + await startOAuthFlow(); + console.log({ authSessionResult }); + if (createdSessionId) { - void setActive?.({ session: createdSessionId }); + if (setActive) { + void setActive({ session: createdSessionId }); + } } else { // Modify this code to use signIn or signUp to set this missing requirements you set in your dashboard. throw new Error(