Not a valid protocol: 'chrome-extension:'
tomasmenezes opened this issue · 2 comments
tomasmenezes commented
Preliminary Checks
- I have reviewed the documentation: https://clerk.com/docs
- I have searched for existing issues: https://github.com/clerk/javascript/issues
- I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
- 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.
Reproduction
n/a
Publishable key
n/a
Description
I was trying to get through the initial auth setup on a chrome extension popup with @clerk/chrome-extension
but it seems that, much like #3545, the protocol check prevents routing redirects from chrome-extension:
.
This also breaks the starter code found in clerk-chrome-extension-starter/v5. Additionally, it seems none of the SSO sign-in account popups are shown with the popup as the origin (also noted in clerk-chrome-extension-starter#1).
Environment
Binaries:
Node: 22.0.0 - /usr/local/bin/node
pnpm: 9.4.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 126.0.6478.61
npmPackages:
@clerk/chrome-extension: ^1.0.18 => 1.0.18
tomasmenezes commented
@LekoArts This is still problematic after #3584 due to /core/clerk.ts#L785
// clerk.ts#L785 - navigate
if (toURL.protocol !== 'http:' && toURL.protocol !== 'https:') {
console.warn('Clerk: Not a valid protocol. Redirecting to /');
toURL = new URL('/', window.location.href);
}
The hard protocol check automatically redirects to '/'.