OAuthProvider
class OAuthProvider : NSObject, FederatedAuthProvider
A concrete implementation of AuthProvider
for generic OAuth Providers.
-
Array used to configure the OAuth scopes.
Declaration
Swift
var scopes: [String]? { get set }
-
Dictionary used to configure the OAuth custom parameters.
Declaration
Swift
var customParameters: [String : String]? { get set }
-
The provider ID indicating the specific OAuth provider this OAuthProvider instance represents.
Declaration
Swift
var providerID: String { get }
-
Declaration
Swift
/*not inherited*/ init(providerID: String)
Parameters
providerID
The provider ID of the IDP for which this auth provider instance will be configured.
Return Value
An instance of
OAuthProvider
corresponding to the specified provider ID. -
Declaration
Swift
/*not inherited*/ init(providerID: String, auth: FIRAuth)
Parameters
providerID
The provider ID of the IDP for which this auth provider instance will be configured.
auth
The auth instance to be associated with the
OAuthProvider
instance.Return Value
An instance of
OAuthProvider
corresponding to the specified provider ID. -
Creates an
AuthCredential
for the OAuth 2 provider identified by provider ID, ID token, and access token.Declaration
Swift
class func credential(withProviderID providerID: String, idToken IDToken: String, accessToken: String?) -> FIROAuthCredential
Parameters
providerID
The provider ID associated with the Auth credential being created.
IDToken
The IDToken associated with the Auth credential being created.
accessToken
The access token associated with the Auth credential be created, if available.
Return Value
A
AuthCredential
for the specified provider ID, ID token and access token. -
Creates an
AuthCredential
for the OAuth 2 provider identified by provider ID using an ID token.Declaration
Swift
class func credential(withProviderID providerID: String, accessToken: String) -> FIROAuthCredential
Parameters
providerID
The provider ID associated with the Auth credential being created.
accessToken
The access token associated with the Auth credential be created
Return Value
An
AuthCredential
. -
Creates an
AuthCredential
for that OAuth 2 provider identified by provider ID, ID token, raw nonce, and access token.Declaration
Swift
class func credential(withProviderID providerID: String, idToken IDToken: String, rawNonce: String?, accessToken: String?) -> FIROAuthCredential
Parameters
providerID
The provider ID associated with the Auth credential being created.
IDToken
The IDToken associated with the Auth credential being created.
rawNonce
The raw nonce associated with the Auth credential being created.
accessToken
The access token associated with the Auth credential be created, if available.
Return Value
A
AuthCredential
for the specified provider ID, ID token and access token. -
Creates an
AuthCredential
for that OAuth 2 provider identified by providerID using an ID token and raw nonce.Declaration
Swift
class func credential(withProviderID providerID: String, idToken IDToken: String, rawNonce: String?) -> FIROAuthCredential
Parameters
providerID
The provider ID associated with the Auth credential being created.
IDToken
The IDToken associated with the Auth credential being created.
rawNonce
The raw nonce associated with the Auth credential being created.
Return Value
-
Creates an
AuthCredential
for the Sign in with Apple OAuth 2 provider identified by ID token, raw nonce, and full name. This method is specific to the Sign in with Apple OAuth 2 provider as this provider requires the full name to be passed explicitly.Declaration
Swift
class func appleCredential(withIDToken IDToken: String, rawNonce: String?, fullName: PersonNameComponents?) -> FIROAuthCredential
Parameters
IDToken
The IDToken associated with the Sign in with Apple Auth credential being created.
rawNonce
The raw nonce associated with the Sign in with Apple Auth credential being created.
fullName
The full name associated with the Sign in with Apple Auth credential being created.
Return Value
An
AuthCredential
. -
This class is not meant to be initialized.