© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
34 replies
Reuben

Best practices for storing Google OAuth tokens with additional scopes

🔢DB Connections
I'm implementing Google OAuth with additional scopes to access the Google Calendar API. The documentation mentions that "On initial login, you can extract the provider_token from the session and store it in a secure storage medium." I'm looking for clarity on what qualifies as a "secure storage medium" in this context.
I need to store both the access token and refresh token so I can call the Google Calendar API from an edge function. The edge function will need access to these tokens to make authenticated requests on behalf of the user.
Specifically:

Is it safe to store these tokens in a Supabase table with proper RLS policies?
Should I be using a different storage method?
Are there any additional security considerations I should be aware of when storing OAuth tokens that will be accessed by edge functions?

I want to make sure I'm following best practices for token storage and security.

Thanks for your help!
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

Storing Google OAuth Tokens
SupabaseSSupabase / help-and-questions
6mo ago
discord oauth scopes
SupabaseSSupabase / help-and-questions
4y ago
Get Google Scopes
SupabaseSSupabase / help-and-questions
5mo ago
bad_oauth_callback error with Google OAuth
SupabaseSSupabase / help-and-questions
14mo ago