appwrite
appwrite copied to clipboard
Refactor Apple OAuth2 getUserName retrieval logic
What does this PR do?
This PR fixes the bug #7268 Ref to this doc user format
Test Plan
Sign in with Apple to test fetching name or not
Checklist
- [x] Have you read the Contributing Guidelines on issues?
- [x] 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?
Even if i try to give scope name, $this->claims returns
Array
(
[iss] => https://appleid.apple.com
[aud] => service.com.appwrite.testapp
[exp] => 1708257457
[iat] => 1708171057
[sub] => 000201.4c58eaf074f54eada4d5fe7cf89bf1a7.1559
[at_hash] => Pe6QnaTkbskuyc2SjzHOLw
[email] => [email protected]
[email_verified] => 1
[is_private_email] => 1
[auth_time] => 1708171056
[nonce_supported] => 1
)
However, according to this docs, it should work otherwise it returns empty string as well.
Returning email as a Name paramater of Auth User, completely replaced with returning name with all other OAuth2 services.
Best
@behics, from what I've read, the name is only provided the first time the user authorizes the OAuth2 app. Every subsequent time, only email is returned. Was your test a fresh authorization or had you authenticated once before?
@behics, from what I've read, the name is only provided the first time the user authorizes the OAuth2 app. Every subsequent time, only email is returned. Was your test a fresh authorization or had you authenticated once before?
@stnguyen90 The test was conducted with a fresh authorization. Every time i deleted user and disconnected auth from apple settings and tried it again
Is there any update on this? I am doing OAuth using Apple and need name.
disconnected auth from apple settings and tried it again
@behics what do you mean by this? Did you disconnect in Appwrite? I was referring to making sure it's the first the the end user authorizes the oauth app.
disconnected auth from apple settings and tried it again
@behics what do you mean by this? Did you disconnect in Appwrite? I was referring to making sure it's the first the the end user authorizes the oauth app.
Yes its the first end user authorizes the oath app.
To test it again, i disconnect user totally between appwrite and "sign-in-with-apple" Before i start to test it,
1- deleted "user which signed in with apple" in appwrite 2- stop user related apple id to "stop using apple ID" 3- try it again from over
@behics, dang...that is infuriating! I'll try to find some time to test myself as well.
@behics, dang...that is infuriating! I'll try to find some time to test myself as well.
@stnguyen90 unfortunately, apple restrictions make it harder to test it
Closing PR as this doesn't work.