-
Notifications
You must be signed in to change notification settings - Fork 408
fix(clerk-expo): Ensure correct mobile detection for native requests #4137
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
Conversation
🦋 Changeset detectedLatest commit: 2fc2705 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 |
anagstef
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
!snapshot |
|
Hey @wobsoriano - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@1.3.1-snapshot.v2fc2705 --save-exact
npm i @clerk/backend@1.10.1-snapshot.v2fc2705 --save-exact
npm i @clerk/chrome-extension@1.3.3-snapshot.v2fc2705 --save-exact
npm i @clerk/clerk-js@5.21.1-snapshot.v2fc2705 --save-exact
npm i @clerk/elements@0.15.1-snapshot.v2fc2705 --save-exact
npm i @clerk/clerk-expo@2.2.9-snapshot.v2fc2705 --save-exact
npm i @clerk/express@0.0.38-snapshot.v2fc2705 --save-exact
npm i @clerk/fastify@1.0.40-snapshot.v2fc2705 --save-exact
npm i @clerk/localizations@3.0.1-snapshot.v2fc2705 --save-exact
npm i @clerk/nextjs@5.5.1-snapshot.v2fc2705 --save-exact
npm i @clerk/clerk-react@5.8.1-snapshot.v2fc2705 --save-exact
npm i @clerk/remix@4.2.24-snapshot.v2fc2705 --save-exact
npm i @clerk/clerk-sdk-node@5.0.37-snapshot.v2fc2705 --save-exact
npm i @clerk/shared@2.7.1-snapshot.v2fc2705 --save-exact
npm i @clerk/tanstack-start@0.3.7-snapshot.v2fc2705 --save-exact
npm i @clerk/testing@1.2.20-snapshot.v2fc2705 --save-exact
npm i @clerk/themes@2.1.29-snapshot.v2fc2705 --save-exact
npm i @clerk/types@4.20.1-snapshot.v2fc2705 --save-exact |
Description
This PR addresses an issue where the
isMobilevalue of aSessionActivityis incorrectly set tofalsefor iOS devices. The problem is caused by some iOS devices sending an emptyuser-agentheader:Here's an example of an expo login request in iOS (notice there's no
user-agentheader andisMobileis false):The backend relies on either the
x-mobileoruser-agentheaders to determine if a request is from a mobile device. This update adds thex-mobileheader for all native requests, ensuring that the backend correctly records session activities as mobile, regardless of theuser-agentvalue.Here's a
SessionActivityrecord after signing in with ax-mobileheader (noticeisMobileistrue):Resolves ECO-189
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change