auth method
Implementation
@override
Future<AuthUser?> auth() async {
if (this.user != null) {
return this.user;
}
final AuthorizationCredentialAppleID result =
await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
if (result.identityToken != null && result.userIdentifier != null) {
print("The identitiy token is ${result.identityToken}");
print("The user token is ${result.userIdentifier}");
creds = {
"idToken": result.identityToken!,
};
this.user = AuthProviderUser().fromJson(creds);
return this.user;
}
}