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 email used for name when user is created via Apple OAuth2 #8102

Merged
merged 3 commits into from May 14, 2024

Conversation

stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented May 8, 2024

What does this PR do?

Fixes #7268

Test Plan

Manually tested Apple OAuth2 and got my name to appear:

image

Related PRs and Issues

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

The only place Apple includes the user's name is in the params so we
need to forward the params to the redirect endpoint so they can be used
when creating the user.
@stnguyen90 stnguyen90 self-assigned this May 8, 2024
@stnguyen90 stnguyen90 linked an issue May 8, 2024 that may be closed by this pull request
2 tasks
@stnguyen90 stnguyen90 changed the title FIx email used for name when user is created via Apple OAuth2 Fix email used for name when user is created via Apple OAuth2 May 8, 2024
This is only applicable for Apple OAuth2 because this is the only
provider that does not return user name from an API call and only
returns the name in the callback URL.

Reference:
* https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332115
Apple OAuth2 does not return the user's name in the claims and so we
used email instead, but this can look broken to users and developers to
see an email where the name should be.
@stnguyen90 stnguyen90 marked this pull request as ready for review May 8, 2024 23:47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg 😮

@TorstenDittmann TorstenDittmann merged commit 0365f48 into 1.5.x May 14, 2024
21 checks passed
@TorstenDittmann TorstenDittmann deleted the fix-7268-oauth-apple-name branch May 14, 2024 09:40
@xuelink
Copy link
Contributor

xuelink commented May 22, 2024

Screenshot_2024-05-22_at_10 25 17_PM

it works fine after v1.5.6, thank you

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.

🐛 Bug Report: Sign in with Apple, user name should not be email
3 participants