feat(clerk-expo): Add expo data to request headers - #2528
Conversation
🦋 Changeset detectedLatest commit: 1bf9c09 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| (requestInit.headers as Headers).set('x-expo-application-id', Application.applicationId ?? NULL_VALUE); | ||
| (requestInit.headers as Headers).set('x-expo-application-name', Application.applicationName ?? NULL_VALUE); | ||
| (requestInit.headers as Headers).set( | ||
| 'x-expo-native-application-version', | ||
| Application.nativeApplicationVersion ?? NULL_VALUE, | ||
| ); |
There was a problem hiding this comment.
What insight might we gain from the app name / id?
There was a problem hiding this comment.
💭 app name == Expo Go is roughly equivalent to request.origin == http://localhost:3000
There was a problem hiding this comment.
More generally, my thinking here falls mostly under "I don't know what I don't know" regarding insights. But presence of this data should at least enable gaining any insight at all!
jescalan
left a comment
There was a problem hiding this comment.
This looks good to me, but I'm not sure I understand the context behind why it's being done. The PR description is just a screenshot of the result, the name of the branch honestly is the closest to context that we have, but even checking the related linear issue pulled from the branch name, there isn't really a lot of context about why this is important or where it came from.
To be clear, I trust that it's for a good reason, just some feedback on how to make PRs like this easier to understand and review for folks down the line 😁
…-apps-using-clerk
|
This change causes issues with the use of clerk/clerk-expo with expo start --web. Adding a bit of code to remove those headers for web platform fixes the issue: I assume that web, being the underused platform for RN, wasn't specifically tested, but i'd love to be able to run it with the same code as the other platforms. Does this have to be a seperate report? |
|
Hey @auropsoft,
Currently, the Does this sound reasonable? Tip You can upvote the addition of Clerk supporting web output here! |
* feat(clerk-expo): Remove headers and dev dependencies - this reverts #2528
Description
What
Send along
x-expo-execution-environmentandx-expo-native-application-versionheaders to help identify the state of a mobile app, calling Clerk.Why
We want to be able to easily determine if a mobile app is in any of "local development", "test flight", "app store/google play" (aka: dev/staging/production, respectively)
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore