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

sign_in_with_apple: getCredentialState always returns authorized #402

Closed
antontishkov opened this issue Feb 19, 2024 · 3 comments
Closed

Comments

@antontishkov
Copy link

Apple reveals user name and email only for the very first authorisation attempt. So my steps to reproduce the issue are the following:

  1. Stop using Apple Sign In for my app here https://appleid.apple.com/account/manage
  2. Call getCredentialState:
    final result = await SignInWithApple.getCredentialState('my_userIdentifier');
    print(result);

It always returns "CredentialState.authorized"... but why?

Testing on iPhone 15 Pro (ios simulator).

@tp
Copy link
Collaborator

tp commented Feb 20, 2024

Are you executing step 1 and 2 in immediate succession?

I would guess there is just a time delay between signing out via the website and your local device (or simulator) updating the state (as this is likely cached, so it would also continue to work offline).

Have you tried logging out from the device instead? From my recollection of earlier tests that is reflected immediately.

@antontishkov
Copy link
Author

Are you executing step 1 and 2 in immediate succession?

I tried this many times with different time gaps. Unfortunately the result always the same.

Looks like the problem is only in iOS Simulator. With the real device everything is working as expected.

@tp
Copy link
Collaborator

tp commented Feb 22, 2024

Okay, then I would see this issue more as documentation for others experiencing similar problems, as I don't think there is something to be done on the client to react quicker to a change on web. (Otherwise I'd appreciate a link to the Apple docs, so we could add the same support in here.)

Generally there are a bunch of quirks when testing SiwA with the iOS simulator, and thus I would recommend to use a physical device whenever possible.

@tp tp closed this as completed Feb 22, 2024
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

No branches or pull requests

2 participants