Interface that represents the OAuth credentials returned by an OAuth
provider. Implementations specify the details about each auth provider's
credential requirements.
The OAuth access token associated with the credential if it belongs to
an OAuth provider, such as facebook.com, twitter.com, etc.
Optional idToken
idToken:string
The OAuth ID token associated with the credential if it belongs to an
OIDC provider, such as google.com.
providerId
providerId:string
The authentication provider ID for the credential.
For example, 'facebook.com', or 'google.com'.
Optional secret
secret:string
The OAuth access token secret associated with the credential if it
belongs to an OAuth 1.0 provider, such as twitter.com.
signInMethod
signInMethod:string
The authentication sign in method for the credential.
For example, 'password', or 'emailLink. This corresponds to the sign-in
method identifier as returned in
firebase.auth.Auth.fetchSignInMethodsForEmail.
Methods
toJSON
toJSON
(): Object
Returns a JSON-serializable representation of this object.
Static method to deserialize a JSON representation of an object into an
firebase.auth.AuthCredential. Input can be either Object or the
stringified representation of the object. When string is provided,
JSON.parse would be called first. If the JSON input does not represent
anAuthCredential, null is returned.
Parameters
json: Object | string
The plain object representation of an
AuthCredential.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["# OAuthCredential | JavaScript SDK\n\n- [firebase](/docs/reference/node/firebase).\n- [auth](/docs/reference/node/firebase.auth).\n- OAuthCredential\n============================================================================================================\n\nInterface that represents the OAuth credentials returned by an OAuth\nprovider. Implementations specify the details about each auth provider's\ncredential requirements.\n\nIndex\n-----\n\n### Constructors\n\n- [constructor](/docs/reference/node/firebase.auth.OAuthCredential#constructor)\n\n### Properties\n\n- [accessToken](/docs/reference/node/firebase.auth.OAuthCredential#accesstoken)\n- [idToken](/docs/reference/node/firebase.auth.OAuthCredential#idtoken)\n- [providerId](/docs/reference/node/firebase.auth.OAuthCredential#providerid)\n- [secret](/docs/reference/node/firebase.auth.OAuthCredential#secret)\n- [signInMethod](/docs/reference/node/firebase.auth.OAuthCredential#signinmethod)\n\n### Methods\n\n- [toJSON](/docs/reference/node/firebase.auth.OAuthCredential#tojson)\n- [fromJSON](/docs/reference/node/firebase.auth.OAuthCredential#fromjson)\n\nConstructors\n------------\n\n### Private constructor\n\n- new OAuthCredential ( ) : [OAuthCredential](/docs/reference/node/firebase.auth.OAuthCredential)\n-\n\n #### Returns [OAuthCredential](/docs/reference/node/firebase.auth.OAuthCredential)\n\nProperties\n----------\n\n### Optional accessToken\n\naccessToken: string \nThe OAuth access token associated with the credential if it belongs to\nan OAuth provider, such as `facebook.com`, `twitter.com`, etc.\n\n### Optional idToken\n\nidToken: string \nThe OAuth ID token associated with the credential if it belongs to an\nOIDC provider, such as `google.com`.\n\n### providerId\n\nproviderId: string\nInherited from [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential).[providerId](/docs/reference/node/firebase.auth.AuthCredential#providerid) \nThe authentication provider ID for the credential.\nFor example, 'facebook.com', or 'google.com'.\n\n### Optional secret\n\nsecret: string \nThe OAuth access token secret associated with the credential if it\nbelongs to an OAuth 1.0 provider, such as `twitter.com`.\n\n### signInMethod\n\nsignInMethod: string\nInherited from [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential).[signInMethod](/docs/reference/node/firebase.auth.AuthCredential#signinmethod) \nThe authentication sign in method for the credential.\nFor example, 'password', or 'emailLink. This corresponds to the sign-in\nmethod identifier as returned in\n[firebase.auth.Auth.fetchSignInMethodsForEmail](/docs/reference/node/firebase.auth.Auth#fetchsigninmethodsforemail).\n\nMethods\n-------\n\n### toJSON\n\n- toJSON ( ) : Object\n-\n Inherited from [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential).[toJSON](/docs/reference/node/firebase.auth.AuthCredential#tojson) \n Returns a JSON-serializable representation of this object.\n\n #### Returns Object\n\n### Static fromJSON\n\n- fromJSON ( json : Object \\| string ) : [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential) \\| null\n-\n Inherited from [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential).[fromJSON](/docs/reference/node/firebase.auth.AuthCredential#fromjson) \n Static method to deserialize a JSON representation of an object into an\n [firebase.auth.AuthCredential](/docs/reference/node/firebase.auth.AuthCredential). Input can be either Object or the\n stringified representation of the object. When string is provided,\n JSON.parse would be called first. If the JSON input does not represent\n an`AuthCredential`, null is returned.\n\n #### Parameters\n\n -\n\n ##### json: Object \\| string\n\n The plain object representation of an\n AuthCredential.\n\n #### Returns [AuthCredential](/docs/reference/node/firebase.auth.AuthCredential) \\| null"]]
Interface that represents the OAuth credentials returned by an OAuth provider. Implementations specify the details about each auth provider's credential requirements.