Class AppleIdSignInManager
- Namespace
- Uralstech.UMoth.AppleIdSignIn
Class to handle AppleID account sign-in.
public class AppleIdSignInManager : DontCreateNewSingleton<AppleIdSignInManager>
- Inheritance
-
objectAppleIdSignInManager
Fields
OnGotCredentialState
Called when the credential state checking operation completes, with the state and any error that occurred.
public UnityEvent<AppleIdCredentialState, string?> OnGotCredentialState
Field Value
- UnityEvent<AppleIdCredentialState, string>
OnSignInFailed
Called when the sign-in flow fails, with the failure reason.
public UnityEvent<AppleIdSignInErrorCode> OnSignInFailed
Field Value
- UnityEvent<AppleIdSignInErrorCode>
OnSignedIn
Called when the sign-in flow succeeds, with the AppleID credential.
public UnityEvent<AppleIdCredential> OnSignedIn
Field Value
- UnityEvent<AppleIdCredential>
Methods
Awake()
protected override void Awake()
GetCredentialState(string)
Returns the credential state for the given user in OnGotCredentialState.
public void GetCredentialState(string userId)
Parameters
userIdstringAn opaque string associated with the Apple ID that your app receives in the credential’s user property after performing a successful authentication request.
GetCredentialStateAsync(string, CancellationToken)
Returns the credential state for the given user.
public Awaitable<(AppleIdCredentialState state, string? errorDescription)> GetCredentialStateAsync(string userId, CancellationToken token = default)
Parameters
userIdstringAn opaque string associated with the Apple ID that your app receives in the credential’s user property after performing a successful authentication request.
tokenCancellationToken
Returns
- Awaitable<(AppleIdCredentialState state, string errorDescription)>
The state and any error that occurred.
ReadNameComponentsToManagedType(ref NativePersonNameComponents?)
Reads a NativePersonNameComponents object into an instance of PersonNameComponents.
protected static PersonNameComponents? ReadNameComponentsToManagedType(ref NativePersonNameComponents? nativeComponents)
Parameters
nativeComponentsNativePersonNameComponents?The native object to read.
Returns
Remarks
While this method DOES NOT dispose of nativeComponents, it does dispose of
its PhoneticRepresentation.
SignIn(AppleIdScope, string?, string?)
Starts the AppleID Sign-In flow.
public void SignIn(AppleIdScope requestedScopes, string? nonce = null, string? state = null)
Parameters
requestedScopesAppleIdScopeThe kinds of contact information that can be requested from the user.
noncestringA string value to pass to the identity provider.
statestringData that's returned to you unmodified in the corresponding credential after a successful authentication.
SignInAsync(AppleIdScope, string?, string?, CancellationToken)
Starts the AppleID Sign-In flow.
public Awaitable<(AppleIdCredential?, AppleIdSignInErrorCode)> SignInAsync(AppleIdScope requestedScopes, string? nonce = null, string? state = null, CancellationToken token = default)
Parameters
requestedScopesAppleIdScopeThe kinds of contact information that can be requested from the user.
noncestringA string value to pass to the identity provider.
statestringData that's returned to you unmodified in the corresponding credential after a successful authentication.
tokenCancellationToken
Returns
- Awaitable<(AppleIdCredential, AppleIdSignInErrorCode)>
The AppleID credential or the failure reason.