Skip to content

Restore LinkedIn login on Expo web build#132

Merged
rxmox merged 1 commit intomainfrom
fix-linkedin-web-flow
May 2, 2026
Merged

Restore LinkedIn login on Expo web build#132
rxmox merged 1 commit intomainfrom
fix-linkedin-web-flow

Conversation

@rxmox
Copy link
Copy Markdown
Collaborator

@rxmox rxmox commented May 2, 2026

Summary

  • The shared loginWithLinkedIn helper hardcoded ?platform=mobile and used a custom-scheme redirect, which broke LinkedIn login on the Expo web export at https://shatter-mobile.vercel.app/
  • Branch on Platform.OS: on web, navigate the current tab directly to ${API_BASE}/api/auth/linkedin (no platform param). Backend defaults to the web flow and redirects to ${FRONTEND_URL}/auth/callback?code=..., which the existing app/auth/callback.tsx route handles. Mobile path unchanged.

Test plan

  • Web local dev: npx expo start --web → tap "Sign up with LinkedIn" → tab navigates to backend → LinkedIn auth → returns to /auth/callback?code=... → user lands on JoinEventPage authenticated
  • Mobile regression: npx expo start on iOS → existing in-app browser flow still works end-to-end
  • Production: after merge + Vercel redeploy, repeat web test against https://shatter-mobile.vercel.app/

The shared loginWithLinkedIn helper hardcoded ?platform=mobile and used
WebBrowser.openAuthSessionAsync with a custom-scheme redirect, which
broke the Expo web export at https://shatter-mobile.vercel.app/. After
LinkedIn auth completed, the backend redirected the browser to
shattermobile://auth/auth/callback?code=..., a custom scheme browsers
cannot follow.

Branch on Platform.OS: on web, navigate the current tab directly to the
backend's /api/auth/linkedin (no platform param). The backend defaults
to the web flow and redirects to ${FRONTEND_URL}/auth/callback?code=...,
which the existing app/auth/callback.tsx route handles. The mobile path
is unchanged.
@rxmox rxmox merged commit c6f98d1 into main May 2, 2026
4 checks passed
@rxmox rxmox deleted the fix-linkedin-web-flow branch May 2, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant