:wave: Hi there! We are currently using Descope to...
# ask-a-descoper
n
👋 Hi there! We are currently using Descope to implement SSO sign-up/sign-in functionality in our Chrome extension. However, we are facing an issue with the UI provided by the react sdk specifically when building a chrome extension. (the react app builds and works just fine). We're getting an eval error when the extension try to show the sign in UI (will provide stack trace soon) If you could provide guidance on how to properly manage the SSO implementation specifically for Chrome extensions that'd be great! thank you!
b
@dazzling-oyster-96577 can you please have a look?
d
Hi @narrow-action-32367, nice to meet you! Yes the stack trace would definitely be helpful, also if you would like to look into this and debug live over zoom we can do that as well.
Because you mentioned
eval()
, I'm wondering if it's a content-security policy issue with Chrome or something related to that?
n
Hi Kevin, thank you for the answer! Is this means that we would need to run descope on a sandboxed file in order for it to work? If we take this route and login the user within a sandboxed file, would we still have access to the current session, descope's hooks etc in the chrome extension?
This is the stack trace btw:
looping @numerous-businessperson-6660 from our team.
n
Hey @dazzling-oyster-96577, @narrow-action-32367 sent the stacktrace here are some screenshots of what we see in the console as well.
d
Yep I'm pretty sure it's a cross-site restriction that Chrome imposes on its extensions. In the web-js sdk function, we're fetching content from an API and there in lies the problem it looks like. Would you like to get on a call and we can discuss a workaround for this issue?
n
yup. I'm available!
@narrow-action-32367 is available too.
Copy code
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
Hi @narrow-action-32367, just wanted to give you an update. I'm still working on this with manifest v3. I was sick since Friday and wasn't able to finish it. I will give you an update when it is complete, and send you a link to my sample app.
n
thanks for the update, @dazzling-oyster-96577!