Open griffin-ezbot opened 2 weeks ago
I also created another Repro Repo using the latest version of @clerk/chrome-extension
, version 1.3.27
. Same issue. It builds code that will not be accepted by the Chrome Web Store. https://github.com/griffin-ezbot/clerk-chrome-extension-starter
Hey @griffin-ezbot - we're so sorry about this. The recent changes to chrome's extension policies have broken the way our extension sdk works by default. Our team is actively looking into ways that we can fix this up such that extensions still get bot protections, but without causing this problem. We'll get an update out as soon as we can!
Sounds good. I'm thinking about removing all Clerk libraries, creating a Clerk OAuth App and using Chrome's Identity API with it for now.
Do you know if that's a good work around for now @jescalan?
Are you able to give us a day or two to tinker on this one? We may well have a fix out for you by then. If it's super time-pressing though, I understand and its worth a shot!
@jescalan – yes. I'll tinker as well during that time. FYI – that cloudflare package even shows up in your headless
package.
I tried using the resources I mentioned in my last message. Getting an authorization code flow going with Clerk isn't easy, but I was able to do it. I couldn't find any documentation on how to exchange an Authorization Code for an Access Token and a Refresh Token.
TLDR; I'm really hoping there's something you guys can do with this package to make it past muster with MVC3; using Clerk with the Chrome Identity API is challenging.
Discussion at the moment is trending in the direction of removing bot protection from our chrome extension SDK since it's unsupported by chrome now. I'll keep you updated when we get something out here!
That would work for me. Unfortunately, as is, clerk is the sole blocker to releasing my chrome extension :/ and this issue was unexpected, making it even more inconvenient. Can you suggest a workaround?
I don't think we have a workaround at the moment, I'm so sorry! We were caught off guard a bit by the policy change and are working to get this fixed as quick as we can!
Thank you! I appreciate the support.
To give more context:
My users sign up directly on my website, rather than through the Chrome extension. I don’t utilize the <SignUp />
component in my extension, which involves CAPTCHA / remote code execution.
While examining your code to temporarily strip out CAPTCHA-related elements for my setup, I noticed another potential issue with your function loadScript
. This function is called to load Clerk’s JavaScript from a CDN, which also isn’t permitted under Manifest V3 (MV3) guidelines.
In other words, to adapt your chrome-extension
package, you'll need to remove any instances of remote code execution—including calls to load Clerk’s JavaScript and to Captcha providers. I think Google One Tap support is also problematic.
Hi @griffin-ezbot. I wanted to touch base here with an update. We are close to a snapshot to test with changes around remote code. This will remove the code that other SDKs use to remotely load clerk-js (the extension always bundled it, but the conditional code was present which is what you spotted and Google has rejected for other users), Google One Tap, Coinbase and Bot protection. This change will affect the Chrome Extension SDK, as well as other packages like @clerk/clerk-js and @clerk/shared.
This is the last blocker for a significant update to the SDK and a new 2.0 major release. This release will also include changing syncSessionWithTab
(which I believe you are using) to synchost
and improvements around sharing sessions and the introduction of createClerkClient()
which is designed specifically for service workers in extensions.
Awesome! That all sounds great. I will be eagerly waiting. Happy to test it once it's ready.
Hey @griffin-ezbot. Please see https://clerk.com/changelog/2024-11-22-chrome-extension-sdk-2.0 for info about the new release. If you need any support please please the Discord or send in an request through https://clerk.com/contact/support
Preliminary Checks
[X] I have reviewed the documentation: https://clerk.com/docs
[X] I have searched for existing issues: https://github.com/clerk/javascript/issues
[X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
The Chrome Web Store Rejection:
Reproduction
https://github.com/clerk/clerk-chrome-extension-starter
Publishable key
pk_test_YmFsYW5jZWQtbW9sbHktODMuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
Steps to reproduce:
npm i
npm run build
/build
directory's output. It contains remotely executed code...https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit...
, which is a violation of the Chrome Web Store policies.Expected behavior:
Building a chrome extension with
@clerk/chrome-extension
should yield code acceptable to the Chrome Web Store so that the extension may become public.Actual behavior:
Building a chrome extension with
@clerk/chrome-extension
yields code unacceptable to the Chrome Web Store and any chrome extensions published with it will get rejected by the Chrome Web Store.Other thoughts
This affects both 0.x and 1.x versions of
@clerk/chrome-extension
due to their dependency on@clerk/clerk-js
version >4.45
Environment