Skip to content

SigninWithApple Events

SigninWithApple has the following events associated with it:


onSuccessCallback Event


An event callback is invoked by the platform when the user performs a sucsessfull authentication action using the Apple ID on the SigninWithApple widget button.

  • Once the user logs in with the Apple ID, we'll get a set of values that will help to store in the keychain.

    Values collectedDescription
    UserUnique user-id
    givenNameName of user
    familyNameUser family Name
    identityTokenThe JSON Web Token (JWT) served to securely communicate user identity information to the app. The ID token, signed by Apple's ID provider, includes the following information: Issuer Identifier, Subject Identifier, Audience, Expiry Time and Issuance Time. Example: Email which is used for sign in
    emailThe email used for sign in.
    authorizationCodeA short-lived, one-time valid token that provides proof of authorization for the server component of the app. The authorization code is connected to the specific transaction using the state attribute passed in the request for authorization. The application's server component will validate the code using the Apple identity service endpoint provided for this purpose.
    authorizedScopesThis value will include a list of scopes for which authorization has been provided by the user. These could contain a subset of the scopes requested on @see ASAuthorizationAppleIDRequest. This value should be queried by the application to identify which scopes have been returned as it may differ from those requested.

Syntax


onSuccessCallback ()

Type

Constant

Read/Write

Read Only

Example

Platform Availability

  • iOS 13 or later

onFailureCallback Event


An event onFailureCallback is invoked by the platform when the user fails a authentication action using the Apple ID on the SigninWithApple widget button.

The following table lists the Error codes that are displayed on the VoltMX Iris.

Error CodesFailure Callback with enum ValuesDescription
1000VoltMXSignInWithAppleAuthorizationErrorUnknownThe authorization attempt failed for an unknown reason.
1001VoltMXSignInWithAppleAuthorizationErrorCanceledThe user canceled the authorization attempt.
1002VoltMXSignInWithAppleAuthorizationErrorInvalidResponseThe authorization request received an invalid response.
1003VoltMXSignInWithAppleAuthorizationErrorNotHandledThe authorization request wasn’t handled.
1004VoltMXSignInWithAppleAuthorizationErrorFailedThe authorization attempt failed.

Syntax


onFailureCallback

Type

Constant

Read/Write

Read only- (Constructor level)

Example

Platform Availability

  • iOS 13 or later.