Robz
Robz
PD🧩 Plasmo Developers
Created by Daluxe on 11/2/2023 in #👟framework
How to use shadcn-ui stylings in content script?
Also looking for a fix
27 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
Interesting Thinking about it, an option would be to save the access token temporarily in a global variable in the BGSW? So that it can be re-used (and avoid increased load on the Auth0 servers and slower response times if we ask for a new access token on each API request) the time the service worker is still active, otherwise -> fetch another access token from Auth0
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
Hum yes doesn't seem optimal The absolute best would be to have the service worker deal with the access token for every request, asking Auth0 to provide one of the fly and never store it Not sure how to achieve this, it seems like this is what they are doing in the provided Auth0 forum link, will try to implement it
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
Might be simpler to just use the normal Auth0 flow in a dedicated webpage and store the access token in secure storage, but it is secure enough ?
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
@louis that would make a good example for Plasmo with Auth0, juste une idée 🙂
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
I'll try to implement it
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
Found this thread -> https://community.auth0.com/t/auth0-in-chrome-extension-content-background-script-mv3/74603/4 Basically: - never store the access token, have the whole auth logic in a Background Service Worker, make any code (popup, content scripts) message the background worker to make authenticated API calls, check if the user is logged in or not etc .. - use Authorization Code Flow with PKCE (because we can't use the normal Auth0 Authorization Flow in a service worker, it needs access to the DOM)
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
I planned to rely on the storage as a global auth state So that in every part of the extension (content scripts, popup ..), I check in the storage if we have an access token and maybe a userId, if we don't -> we show a button "login" to redirect to a tab page where we deal with the Auth0 redirect flow -> when the user login with Auth0, the callback redirect to this same tab page and then we store the access token in the storage But I imagine the problem with this approach is that when the user reload Chrome / or the Extension is updated etc => we need to ask the user to login again to get an access token ?
20 replies
PD🧩 Plasmo Developers
Created by nifemi on 9/18/2023 in #🔰newbie
Plasmo with auth0.com
@brent-silkline#1 once you get an access token, do you store it in storage so that it can be easily retrieved in all parts of your extension? (popup, content scripts etc) How do you deal with the access token refresh or extension reloading ?(need to get another access token)
20 replies