voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
45 lines (25 loc) • 1.08 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[](./index.md) > [@firebase/auth](./auth.md) > [EmailAuthProvider](./auth.emailauthprovider.md) > [credential](./auth.emailauthprovider.credential.md)
Initialize an [AuthCredential](./auth.authcredential.md) using an email and password.
<b>Signature:</b>
```typescript
static credential(email: string, password: string): EmailAuthCredential;
```
| Parameter | Type | Description |
| --- | --- | --- |
| email | string | Email address. |
| password | string | User account password. |
<b>Returns:</b>
[](./auth.emailauthcredential.md)
The auth provider credential.
```javascript
const authCredential = EmailAuthProvider.credential(email, password);
const userCredential = await signInWithCredential(auth, authCredential);
```
```javascript
const userCredential = await signInWithEmailAndPassword(auth, email, password);
```