login method
Signs in a user with their Apple account.
If no user exists yet linked to the Apple-provided identifier, a new one
will be created (without any Scopes). Further their provided name and
email (if any) will be used for the UserProfile which will be linked to
their AuthUser.
Returns a session for the user upon successful login.
Implementation
Future<AuthSuccess> login(
final Session session, {
required final String identityToken,
required final String authorizationCode,
/// Whether the sign-in was triggered from a native Apple platform app.
///
/// Pass `false` for web sign-ins or 3rd party platforms like Android.
required final bool isNativeApplePlatformSignIn,
final String? firstName,
final String? lastName,
}) async {
return appleIdp.login(
session,
identityToken: identityToken,
authorizationCode: authorizationCode,
isNativeApplePlatformSignIn: isNativeApplePlatformSignIn,
firstName: firstName,
lastName: lastName,
);
}