Home > @firebase/auth > FacebookAuthProvider > credential
FacebookAuthProvider.credential() method
Creates a credential for Facebook.
Signature:
static credential(accessToken: string): OAuthCredential;
Parameters
Parameter | Type | Description |
---|---|---|
accessToken | string | Facebook access token. |
Returns:
Example
// `event` from the Facebook auth.authResponseChange callback.
const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);
const result = await signInWithCredential(credential);