Is there any other steps I have to set up in the c...
# help
s
Is there any other steps I have to set up in the client side other than signing in the user with
supabase.auth.signIn()
? Refresh tokens or something? I seem to need to re-login very often (few times a day/daily) while developing on the project.
k
Yes, that's what refresh_tokens are for
You should be able to setup a "save refresh_token" function with
supabase.auth.onAuthStateChange((event, session) => { ... })
.
When starting your app, you can try to
supabase.auth.signIn({refresh_token: ...})
with the token you've saved
s
I'll look into it. Feels like that something that should just.. happen by default though? client already stores token in local storage, why must the user manually fuss with refresh tokens
k
I'm not familiar with the JS client, maybe there's a way to sign in automatically
s
Fair 🙂