Skip to content

Question: Does getCredentialStateForUser reliably return State.TRANSFERRED after an App transfer? #381

Description

@zzetao

Hi,

We are currently planning to transfer our iOS application to a new Apple Developer Team, and we have a critical concern regarding the behavior of appleAuth.getCredentialStateForUser(user) for our existing users.

In our current and older versions of the app (which are already in production and installed on users' devices), we strictly check if the credential state is AUTHORIZED right after performRequest():

const appleRes = await appleAuth.performRequest({
  requestedOperation: appleAuth.Operation.LOGIN,
  requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL],
});

const credentialState = await appleAuth.getCredentialStateForUser(appleRes.user);

// Our legacy code strictly hardcoded this check to 1 (AUTHORIZED)
if (identityToken && credentialState === appleAuth.State.AUTHORIZED) { 
  // Proceed to our backend login
} else {
  // Block login and show error
}

According to Apple's App Transfer documentation, the credential state for existing users becomes ASAuthorizationAppleIDProviderCredentialStateTransferred after the transfer.

My questions are:

Will appleAuth.getCredentialStateForUser(user) definitively return appleAuth.State.TRANSFERRED (value 3) when an existing user tries to sign in after the Team transfer?
If so, does this mean our older app versions will completely block existing users from logging in because we only allowed credentialState === 1?
Or is it possible that a fresh invocation of appleAuth.performRequest() overrides the transferred state and still returns AUTHORIZED (value 1), allowing our legacy code to survive during the migration period?
Any insights or clarifications from your past experiences with app transfers using this library would be highly appreciated. Thank you so much!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions