The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > OAuthProvider > credentialFromJSON

OAuthProvider.credentialFromJSON() method

Creates an OAuthCredential from a JSON string or a plain object.

Signature:

static credentialFromJSON(json: object | string): OAuthCredential;

Parameters

Parameter Type Description
json object | string A plain object or a JSON string

Returns:

OAuthCredential