-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JS-775] @clerk/clerk-expo gives "invalid request headers" error in expo web #1792
Comments
I tried playing with some dashboard settings. Turning "Enable URL-based session syncing" off did not fix the issue. I re-enabled it after my test. I tried specifying "Fallback development host" to "http://localhost:8081" and it did not fix the issue. I cleared the field after my test. |
@jescalan I saw this was touched. Any updates on getting this issue onto the roadmap? We'd love to use Clerk on web. |
I'm experiencing the same issue as well. I used to be able to use Clerk on the web with Expo as recently as a couple months ago so I'm guessing this is the result of a recent code change. |
Added to feature requests here: FEA-37 |
For folks who stumble upon this issue, I received the following message on Discord from a Clerk representative:
|
This, from the example app is telling -
Looking at the definition of What if for Looks like that's what happens in |
This is an interesting proposal. I tried two different implementations with no success. I'm not confident there is a quick fix given the response from Clerk. Also, note you shared the source of Token cache implementations
const createMemoryTokenCache = (): TokenCache => {
const cache: Record<string, string> = {};
return {
async saveToken(key, token) {
cache[key] = token;
return Promise.resolve();
},
async getToken(key) {
return Promise.resolve(cache[key]);
},
async clearToken(key) {
delete cache[key];
},
};
};
const createSessionTokenCache = (): TokenCache => {
return {
async saveToken(key, token) {
sessionStorage.setItem(key, token);
},
async getToken(key) {
return sessionStorage.getItem(key);
},
async clearToken(key) {
sessionStorage.removeItem(key);
},
};
}; |
What I've decided to do here is create a file I'm going to close this issue due to the official response I mentioned above. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Preliminary Checks
Reproduction / Replay Link
https://github.com/johnjensenish/clerk-expo-web-request-header-missing
Publishable key
pk_test_dHJ1c3RlZC13YWxydXMtNjAuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
@clerk/clerk-expo
does not seem to function correctly when running the Expo web platform with the Metro bundler. Our app uses the Metro bundler in order to have one bundler process across platforms.API calls result in an "Invalid request headers" message.
Error message:
The
signUp.create()
API results in the following error in the Chrome console (formatted for legibility).Steps to reproduce:
npm install
npm run web
Expected behavior:
After tapping "Sign Up", the app navigates to the verification code screen.
iOS behavior:
The app matches expected behavior when using
npm run ios
, and an account can be created.(Phone number is censored)
Environment
JS-775
The text was updated successfully, but these errors were encountered: