capacitor-community / apple-sign-in

Sign in with Apple Support
MIT License
143 stars 60 forks source link

Resetting Apple id logins doesn't work #44

Open xyboox opened 3 years ago

xyboox commented 3 years ago

Describe the bug Resetting the apple id logins doesn't seem to have any effect on the dialog the OS is presenting after subsequent authorization attempts. It shows up the same one as for the login.

To Reproduce Steps to reproduce the behavior:

  1. authorize the apple signin
  2. remove the apple id login permission for the app
  3. attempt to re-authorize the app. the dialog is one the os is showing for login screen not for authorize ( with choosing the full name and email option to show/hide ).
  4. as a result, the fullname and email is not returned upon login.

Desktop (please complete the following information):

Smartphone (please complete the following information):

lcsoka commented 3 years ago

Hi,

I don't know if it's still relevant, but that's not how the apple sign in api works. You need to revoke the permission to the app in your apple id (account) settings. You can do it on your iPhone by following these steps: https://stackoverflow.com/a/58996577

Or yo can do it on your computer by logging in here: https://appleid.apple.com/ and then remove the access there.

I hope that I could help.

xyboox commented 3 years ago

Hey @lcsoka , thanks for the answer. Please review my very first sentence above. I did mention that I made a reset ( or revoke as you call it ) but to no avail. And that is what this report is about. Regards.

lcsoka commented 3 years ago

Hey @lcsoka , thanks for the answer. Please review my very first sentence above. I did mention that I made a reset ( or revoke as you call it ) but to no avail. And that is what this report is about. Regards.

Sorry, for the misunderstanding, I thought that You just turned off and on the permission in the settings but now I just realised that there are no such option. πŸ˜…

Anyhow I tested this issue with my own application and it works just fine. I had to restart the application to see the authorization screen (where I can change my name, and hide my email address). I used the latest version of this plugin (0.1.2), and I also checked both revoking solutions. (The one in iPhone's settings, and the one on Apple's website).

xyboox commented 3 years ago

Maybe is related to the iOS version? I'm testing an an iOS 14.6 with latest Capacitor plugin.

lcsoka commented 3 years ago

I also tested with 14.6. Did you try to remove the app and then reinstall it?

xyboox commented 3 years ago

Yes, several times, also with device restart and with Apple account logout and log-back in.

lcsoka commented 3 years ago

That's really strange. I think I have an iPhone 6s laying somewhere in the office, I will try it out today.

xyboox commented 3 years ago

Alright, please let me know. And thanks!

lcsoka commented 3 years ago

Unfortunately, we only have an iPhone 6 here and it only runs iOS 12.5.6 where Sign in with Apple is not available, so I couldn't reproduce this bug. But I tested it on some other iPhones as well (iPhone SE 2, iPhone X, iPhone 12, iPhone 12 Pro Max) and it worked on all. I hope someone can help You find a solution, although the Swift code looks fine.

exomc commented 3 years ago

Hi I am also experiencing this issue.

I am testing on an iPad Pro version 14.7.1

I have the latest version of this plugin (0.1.2), and checked both revoking solutions, and deleted the app.

I have never been able to get the initial screen back, and the email and name in the response is always null

jammin197 commented 3 years ago

Hi, unfortunately I have the very same issue as you guys... Apple login worked well on Capacitor 2 ("capacitor-apple-login": "github:rlfrahm/capacitor-apple-login"). Today I migrated my app to Capacitor 3 and apple sign in stopped to work, because it does not return email and familyName (also after "Stop using Apple ID" click) in other words, it is not possible to reset. Now i am using this plugin ("@capacitor-community/apple-sign-in": "^0.1.2") - I also tried the newest version 1.0.1 but no success

Code before:

appleLoginClick() { const { SignInWithApple } = Plugins;

SignInWithApple.Authorize().then(async (res) => { if (res.response && res.response.identityToken) { this.utils.log('DEBUG', 'SignInWithApple.Authorize()', 'appleResponse', res.response); }

Code now - after migration to Capacitor 3 (broken sign in)

import { SignInWithApple, SignInWithAppleResponse, SignInWithAppleOptions, } from '@capacitor-community/apple-sign-in';

appleLoginClick() { SignInWithApple.authorize() .then(async (res) => { if (res.response && res.response.identityToken) { this.utils.log('DEBUG', 'SignInWithApple.Authorize()', 'appleResponse', res.response);

lcsoka commented 3 years ago

Hi, unfortunately I have the very same issue as you guys... Apple login worked well on Capacitor 2 ("capacitor-apple-login": "github:rlfrahm/capacitor-apple-login"). Today I migrated my app to Capacitor 3 and apple sign in stopped to work, because it does not return email and familyName (also after "Stop using Apple ID" click) in other words, it is not possible to reset. Now i am using this plugin ("@capacitor-community/apple-sign-in": "^0.1.2") - I also tried the newest version 1.0.1 but no success

Code before:

appleLoginClick() { const { SignInWithApple } = Plugins;

SignInWithApple.Authorize().then(async (res) => { if (res.response && res.response.identityToken) { this.utils.log('DEBUG', 'SignInWithApple.Authorize()', 'appleResponse', res.response); }

Code now - after migration to Capacitor 3 (broken sign in)

import { SignInWithApple, SignInWithAppleResponse, SignInWithAppleOptions, } from '@capacitor-community/apple-sign-in';

appleLoginClick() { SignInWithApple.authorize() .then(async (res) => { if (res.response && res.response.identityToken) { this.utils.log('DEBUG', 'SignInWithApple.Authorize()', 'appleResponse', res.response);

Hi, Did you leave the options parameter out of the .authorize() call on purpose? It should contain a scopes parameter. This tells iOS which data should be returned. It can either be "email", "name", or both like "email name". The plugin checks if the given string contains any of these values.

jammin197 commented 3 years ago

Hi, Did you leave the options parameter out of the .authorize() call on purpose? It should contain a scopes parameter. This tells iOS which data should be returned. It can either be "email", "name", or both like "email name". The plugin checks if the given string contains any of these values.

Hi sir, you solved my issue!! Now it works. In previous version ("github:rlfrahm/capacitor-apple-login") it was not mandatory and that is a reason why I left the options parameter. My fault. Maybe documentation could be better described.

Anyway, thanks for this plugin and for your very fast response!!

halexalexe commented 6 months ago

Describe the bug Resetting the apple id logins doesn't seem to have any effect on the dialog the OS is presenting after subsequent authorization attempts of apple unlink device. It shows up the same one as for the login.

To Reproduce Steps to reproduce the behavior:

  1. authorize the apple signin
  2. remove the apple id login permission for the app
  3. attempt to re-authorize the app. the dialog is one the os is showing for login screen not for authorize ( with choosing the full name and email option to show/hide ).
  4. as a result, the fullname and email is not returned upon login.

Desktop (please complete the following information):

  • OS: Catalina
  • Version 10.15.7

Smartphone (please complete the following information):

  • Device: iphone 6s
  • OS: ios 14.6

It seems like you're encountering an issue with Apple ID logins not being reset properly on macOS Catalina (version 10.15.7) and iOS 14.6. This issue is particularly evident when attempting to re-authorize an app after removing Apple ID login permission. The dialog presented by the operating system is the same as the one for the initial login, rather than the one for re-authorization, leading to problems retrieving the full name and email upon login.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

Ensure Latest Updates: Make sure that both your macOS Catalina and iOS 14.6 are up to date. Sometimes, bugs like these are addressed in software updates.

Clear App Data: Try clearing the app's data/cache or even reinstalling the app entirely on both your macOS Catalina and iOS 14.6 devices. Sometimes, residual data can cause unexpected behavior.

Check Apple ID Settings: Go to your Apple ID settings on both devices and ensure that the app in question is listed there. You may need to revoke access and then re-enable it to see if that resolves the issue.

Contact Apple Support: If the issue persists after trying the above steps, it might be a more complex issue that requires assistance from Apple Support. They may be able to provide further guidance or escalate the issue if necessary.

Report Bug: If you believe this is a bug with the operating system, consider reporting it to Apple via their feedback channels. This helps Apple identify and address issues in future updates.

By following these steps, you should hopefully be able to resolve the issue with resetting Apple ID logins on macOS Catalina and iOS 14.6.

halexalexe commented 4 months ago

Esportsν† ν† λŠ” ν†΅κ³„ν•™μ μœΌλ‘œ μ „μ„Έκ³„μ—μ„œ 3μ–΅μ˜ μΈκ΅¬μˆ˜κ°€ κ΄€λžŒν•˜κ³ μžˆμœΌλ©°, κ°€μž₯ λΉ λ₯΄κ²Œ μ„±μž₯ν•˜κ³  μžˆλŠ” 슀포츠 μž…λ‹ˆλ‹€. μŠ€νƒ€ν† ν† 

λ˜ν•œ λŒ€ν•œλ―Όκ΅­μ΄ PC속도 및 PCλ°© λ¬Έν™”κ°€ μ΅œμ ν™”κ°€ λ˜μ–΄ μžˆμŒμ— λ”°λΌμ„œ μžμ—°μ μœΌλ‘œ κ²Œμž„μ— 관심이 쏠릴수 밖에 μ—†λŠ”κ²ƒμ΄ ν˜„μ‹€μž…λ‹ˆλ‹€. ν™€λ€μ‚¬μ΄νŠΈ Esportsν† ν† λŠ” ν†΅κ³„ν•™μ μœΌλ‘œ μ „μ„Έκ³„μ—μ„œ 3μ–΅μ˜ μΈκ΅¬μˆ˜κ°€ κ΄€λžŒν•˜κ³ μžˆμœΌλ©°, κ°€μž₯ λΉ λ₯΄κ²Œ μ„±μž₯ν•˜κ³  μžˆλŠ” 슀포츠 μž…λ‹ˆλ‹€.

λ˜ν•œ λŒ€ν•œλ―Όκ΅­μ΄ PC속도 및 PCλ°© λ¬Έν™”κ°€ μ΅œμ ν™”κ°€ λ˜μ–΄ μžˆμŒμ— λ”°λΌμ„œ μžμ—°μ μœΌλ‘œ κ²Œμž„μ— 관심이 쏠릴수 밖에 μ—†λŠ”κ²ƒμ΄ ν˜„μ‹€μž…λ‹ˆλ‹€. ν™€λ€μ‚¬μ΄νŠΈ