AppleAuthProvider class

This class should be used to either create a new Apple credential with an access code, or use the provider to trigger user authentication flows.

For example, on web based platforms pass the provider to a Firebase method (such as signInWithPopup):

var appleProvider = AppleAuthProvider();
appleProvider.addScope('email');
appleProvider.setCustomParameters({
  'locale': 'fr',
});

FirebaseAuth.instance.signInWithPopup(appleProvider)
  .then(...);

If authenticating with Apple via a 3rd party, use the returned accessToken to sign-in or link the user with the created credential, for example:

String accessToken = '...'; // From 3rd party provider
var appleAuthCredential = AppleAuthProvider.credential(accessToken);

FirebaseAuth.instance.signInWithCredential(appleAuthCredential)
  .then(...);
Inheritance

Constructors

AppleAuthProvider()
Creates a new instance.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
parameters Map
Returns the parameters for this provider instance.
read-only
providerId String
The provider ID.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scopes List<String>
Returns the currently assigned scopes to this provider instance.
read-only

Methods

addScope(String scope) AppleAuthProvider
Adds Apple OAuth scope.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCustomParameters(Map customOAuthParameters) AppleAuthProvider
Sets the OAuth custom parameters to pass in a Apple OAuth request for popup and redirect sign-in operations.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

APPLE_SIGN_IN_METHOD String
This corresponds to the sign-in method identifier.
read-only
PROVIDER_ID String
read-only

Static Methods

credential(String accessToken) OAuthCredential
Create a new AppleAuthCredential from a provided accessToken;