Skip to content

Authentication #1334

Answered by aklinker1
joneslloyd asked this question in Q&A
Discussion options

You must be logged in to vote

The suggested method is to use OAuth, which is the most secure. Here's a guide using supabase, but it should be very similar for every other oauth client (auth0, GCP, etc)

https://beastx.ro/supabase-login-with-oauth-in-chrome-extensions

Otherwise, if the API you're using doesn't support oauth, you can just manage access/refresh tokens (or however the API does authentication) in extension storage. Not super secure, but a solution. Extension storage is more secure than localStorage, but not perfect. You could encode values at rest (like the feature Plasmo provides), making it a bit harder to debug. I plan on adding that to @wxt/storage, but haven't yet.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by joneslloyd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants