Open anshul-kai opened 3 months ago
The setSession()
method only affects the session for the local Supabase client; it does not contact the Supabase server with changes.
Thanks @j4w8n! I think the core ask here is to have clear documentation on how to override the default session behavior. Think of a simple "remember me" functionality. How is one supposed to allow certain user sessions to expire sooner than others?
I think you'll have to wire up something yourself for that kind of feature. A "long time ago", I had my own Supabase auth helper with a remember me feature. Unchecked, the user would just have a session cookie; checked it would be a normal cookie with whatever lifetime value I used as a default; then, it defaulted to "checked" if you didn't use the feature.
Off the top of my head, I'm not sure how you'd work that into the ssr library, but I'm sure it's possible.
Bug report
Describe the bug
Although the JWT secret is exposed via the dashboard, one is unable to make use of it to update the session using the
supabase.auth.setSession
function. It ignores the changes made to the newlycreated
&signed
tokens.What is the purpose of exposing the JWT secret if user-created tokens are being ignored?
To Reproduce
Expected behavior
Create APIs/functions to override default token functionality ie. set expiration and renewal rules
System information