Closed michael-land closed 2 months ago
I have exactly the same issue when follow the instructions from chrome-extension readme
Already patch {"allowed_origins": ["chrome-extension://hffncgjlomhcifdgaagggiemefokmpnp"]}
to project
More context: I'm running in content scripts, not sure if it's the root cause. This now is the blocking to my release 🥲
Faced the same response error, using @clerk/clerk-expo
and sign-up with Google
Possible because of this line
https://github.com/clerk/javascript/blob/main/packages/expo/src/singleton.ts#L43
Hi all,
The issue here is that the ID for the Chrome Extension / Expo application has changed since allowed_origins
was set.
This can happen in a number of scenarios, for example, when uninstalling and re-installing a Chrome Extension.
Two options are either update to allowed_origins
with the new origin, or to set a unique ID.
Is there a workaround for getting this to work on Expo web?
Hi all,
The issue here is that the ID for the Chrome Extension / Expo application has changed since
allowed_origins
was set.This can happen in a number of scenarios, for example, when uninstalling and re-installing a Chrome Extension.
Two options are either update to
allowed_origins
with the new origin, or to set a unique ID.
Can you please elaborate this solution on Expo Web's context? It is happening on web app version of Expo sometimes.
@abarax did you find a solution?
I'm not sure if this is the correct solution, but it's working:
import { ClerkProvider } from '@clerk/clerk-expo';
import {ClerkProvider as ClerkProviderWeb} from '@clerk/clerk-react';
const ClerkProviderSelection = ({children}: PropsWithChildren) => {
if(Platform.OS === 'web') return <ClerkProviderWeb publishableKey={publishableKey}>{children}</ClerkProviderWeb>;
else return <ClerkProvider publishableKey={publishableKey} tokenCache={secureStore}>{children}</ClerkProvider>;
};
Happening on expo:web for me as well, using the workaround above works
I'm not sure if this is the correct solution, but it's working:
import { ClerkProvider } from '@clerk/clerk-expo'; import {ClerkProvider as ClerkProviderWeb} from '@clerk/clerk-react'; const ClerkProviderSelection = ({children}: PropsWithChildren) => { if(Platform.OS === 'web') return <ClerkProviderWeb publishableKey={publishableKey}>{children}</ClerkProviderWeb>; else return <ClerkProvider publishableKey={publishableKey} tokenCache={secureStore}>{children}</ClerkProvider>; };
this works!
Preliminary Checks
Reproduction
https://github.com/clerk/clerk-chrome-extension-starter/tree/v5
Publishable key
pk_test_ZW1pbmVudC1zdW5iZWFtLTUzLmNsZXJrLmFjY291bnRzLmRldiQ
Description
I encountered an issue while setting up Clerk with a browser extension, using https://github.com/clerk/clerk-chrome-extension-starter/tree/v5 as a starting point. After following the setup instructions, I updated the allowed_origins to include my extension ID using this command:
Steps to reproduce:
Expected behavior:
should work
Actual behavior:
does not work
Environment