voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
25 lines (14 loc) • 817 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [GithubAuthProvider](./auth.githubauthprovider.md) > [credentialFromError](./auth.githubauthprovider.credentialfromerror.md)
## GithubAuthProvider.credentialFromError() method
Used to extract the underlying [OAuthCredential](./auth.oauthcredential.md) from a [AuthError](./auth.autherror.md) which was thrown during a sign-in, link, or reauthenticate operation.
<b>Signature:</b>
```typescript
static credentialFromError(error: FirebaseError): OAuthCredential | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| error | FirebaseError | |
<b>Returns:</b>
[OAuthCredential](./auth.oauthcredential.md) \| null