https://supabase.com/ logo
#help
Title
# help
r

robin

04/13/2022, 7:55 PM
Hi all, I have a sign-up/in flow with 3rd-party providers 99% working in my app 🙂 I need help with the last %! After you get redirected from the provider back to the app,
app.supabase.auth.user()
still returns the cached
null
user, and the app thinks you haven't signed in. If you reload, everything works fine. What's the best way to fix this?
n

Needle

04/13/2022, 7:55 PM
Hello @robin! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
g

garyaustin

04/13/2022, 8:19 PM
Assuming this is all on the client side, add in onAuthStateChange() and look for the signed in event. auth.user() is not set up immediately on start of code.
n

Needle

04/13/2022, 8:19 PM
robin (2022-04-13)
r

robin

04/13/2022, 8:26 PM
Trying it out now 🙂
it works! ty 🙂
n

Needle

04/13/2022, 8:35 PM
Thread was archived by @robin. Anyone can send a message to unarchive it.