© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
6 replies
cloud

How to set Supabase session data for provider?

# setSession()
Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
If the refresh token or access token in the current session is invalid, an error will be thrown.
- setSession() takes in a refresh token and uses it to get a new session.
- The refresh token can only be used once to obtain a new session.
# setSession()
Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
If the refresh token or access token in the current session is invalid, an error will be thrown.
- setSession() takes in a refresh token and uses it to get a new session.
- The refresh token can only be used once to obtain a new session.


Does it mean when I set or change some session data, my supabase refresh token is no longer valid? How do I get a new refresh token? Does calling refreshSession reset my session data? Can I call it after my refresh token becomes invalid?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase logout should terminate oauth provider session
SupabaseSSupabase / help-and-questions
4w ago
Exchanging provider token for Supabase token
SupabaseSSupabase / help-and-questions
4y ago
Supabase Session Management
SupabaseSSupabase / help-and-questions
4y ago
Set url for supabase project
SupabaseSSupabase / help-and-questions
4y ago