sbr
04/04/2022, 8:53 AMsupabase.auth.token
key. Indeed supabase.io does the same. But in my NextJS app with auth-helpers I'm not seeing anything in local storage but two cookies with the name sb-access-token
and sb-refresh-token
. Can someone please explain why it's different for my app?Needle
04/04/2022, 8:53 AM/title
command!
We have solved your problem?
Click the button below to archive it.Needle
04/04/2022, 8:55 AMthorwebdev
04/04/2022, 9:13 AMthorwebdev
04/04/2022, 9:14 AMsbr
04/04/2022, 9:17 AMonAuthStateChange
listener from triggering if the user logs out in a different tab?thorwebdev
04/04/2022, 9:22 AMsbr
04/04/2022, 9:25 AM/api/auth/logout
instead of supabaseClient.auth.signOut()
, the onAuthStateChange
listener will be triggered?sbr
04/04/2022, 9:27 AMonAuthStateChange
listener and just a useUser()
hook would trigger a refresh of a page when the user logs out in a different page?thorwebdev
04/04/2022, 9:28 AMsbr
04/04/2022, 9:33 AMsbr
04/04/2022, 9:35 AMuseUser
hook and it's not refreshed either when a user signs in or signs outsbr
04/04/2022, 9:47 AMsupabaseClient.auth.signOut()
vs /api/auth/logout
?sbr
04/04/2022, 7:01 PMuseUser
hook won't refresh the page!saeris
04/05/2022, 12:52 AMNeedle
04/05/2022, 12:52 AMsaeris
04/05/2022, 12:55 AMsaeris
04/05/2022, 12:58 AMsb-access-token
cookie to authorize the request to Supabase, if a request from your client to that handler comes in and there's no longer a cookie set, it would get bounced as unauthorized and simultaneously trigger the signed out event for that clientthorwebdev
04/05/2022, 1:03 AMsaeris
04/05/2022, 1:06 AMsaeris
04/05/2022, 1:07 AMthorwebdev
04/05/2022, 5:48 AMsbr
04/06/2022, 5:14 AMsb-access-token
cookie every time it makes a request to Supabase instead of using the stored credentials like @User pointed out here https://github.com/supabase-community/supabase-auth-helpers/blob/next/src/react/components/UserProvider.tsx#L55 ?sbr
04/06/2022, 5:16 AMsetUser(user)
hook call in https://github.com/supabase-community/supabase-auth-helpers/blob/next/src/react/components/UserProvider.tsx#L58 isn't refreshing all the pages where const {user, error} = useUser()
has been defined. That's the crux of the issue I think. Do you know why that could be happening?rodbs
04/19/2022, 5:29 PM