Skip to content
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

[fix] Fix Apple login callbacks not redirecting back to the App for Expo #1262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garshythoel
Copy link

@garshythoel garshythoel commented Nov 28, 2024

The current version of the repo doesn't work for Sign in with Apple mainly because apple sends a POST request for the callback as opposed to a GET request.

Current Behavior
When signing in on an expo app with Apple, the website login happen in the auth-browser but does not actually exit out and redirect to the app. Because of this the token is not set on the app either.

Apple sends the /callback request as a POST rather than a GET. In this change we create an expo callback handler function and use that in both the GET and POST request handlers.

CleanShot 2024-11-27 at 19 41 46@2x

New Behavior
The website login takes place in the Auth browser and redirects to the app - setting the session token correctly.

@garshythoel garshythoel marked this pull request as draft November 28, 2024 00:35
@garshythoel garshythoel deleted the apple_expo_handling branch November 28, 2024 00:35
@garshythoel garshythoel restored the apple_expo_handling branch November 28, 2024 00:36
@garshythoel garshythoel deleted the apple_expo_handling branch November 28, 2024 00:36
@garshythoel garshythoel restored the apple_expo_handling branch November 28, 2024 00:36
@garshythoel garshythoel reopened this Nov 28, 2024
@garshythoel garshythoel changed the title [fix] Fix apple callbacks not redirecting for expo logins [fix] Fix apple callbacks not redirecting to App for expo logins Nov 28, 2024
@garshythoel garshythoel changed the title [fix] Fix apple callbacks not redirecting to App for expo logins [fix] Fix Apple login callbacks not redirecting back to the App for Expo Nov 28, 2024
@garshythoel garshythoel marked this pull request as ready for review November 28, 2024 00:44
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