[[["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 2024-01-19 UTC."],[],[],null,["# EmailAuthProvider class\n\nProvider for generating [EmailAuthCredential](./auth.emailauthcredential.md#emailauthcredential_class).\n\n**Signature:** \n\n export declare class EmailAuthProvider implements AuthProvider \n\n**Implements:** [AuthProvider](./auth.authprovider.md#authprovider_interface)\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-------------------------------------------------------------------------------------------------------------|-----------|-------------|---------------------------------------------------------------------------------|\n| [EMAIL_LINK_SIGN_IN_METHOD](./auth.emailauthprovider.md#emailauthprovideremail_link_sign_in_method) | `static` | 'emailLink' | Always set to [SignInMethod](./auth.md#signinmethod).EMAIL_LINK. |\n| [EMAIL_PASSWORD_SIGN_IN_METHOD](./auth.emailauthprovider.md#emailauthprovideremail_password_sign_in_method) | `static` | 'password' | Always set to [SignInMethod](./auth.md#signinmethod).EMAIL_PASSWORD. |\n| [PROVIDER_ID](./auth.emailauthprovider.md#emailauthproviderprovider_id) | `static` | 'password' | Always set to [ProviderId](./auth.md#providerid).PASSWORD, even for email link. |\n| [providerId](./auth.emailauthprovider.md#emailauthproviderproviderid) | | \"password\" | Always set to [ProviderId](./auth.md#providerid).PASSWORD, even for email link. |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|---------------------------------------------------------------------------------------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [credential(email, password)](./auth.emailauthprovider.md#emailauthprovidercredential) | `static` | Initialize an [AuthCredential](./auth.authcredential.md#authcredential_class) using an email and password. |\n| [credentialWithLink(email, emailLink)](./auth.emailauthprovider.md#emailauthprovidercredentialwithlink) | `static` | Initialize an [AuthCredential](./auth.authcredential.md#authcredential_class) using an email and an email link after a sign in with email link operation. |\n\nEmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD\n-------------------------------------------\n\nAlways set to [SignInMethod](./auth.md#signinmethod).EMAIL_LINK.\n\n**Signature:** \n\n static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink';\n\nEmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD\n-----------------------------------------------\n\nAlways set to [SignInMethod](./auth.md#signinmethod).EMAIL_PASSWORD.\n\n**Signature:** \n\n static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password';\n\nEmailAuthProvider.PROVIDER_ID\n-----------------------------\n\nAlways set to [ProviderId](./auth.md#providerid).PASSWORD, even for email link.\n\n**Signature:** \n\n static readonly PROVIDER_ID: 'password';\n\nEmailAuthProvider.providerId\n----------------------------\n\nAlways set to [ProviderId](./auth.md#providerid).PASSWORD, even for email link.\n\n**Signature:** \n\n readonly providerId: \"password\";\n\nEmailAuthProvider.credential()\n------------------------------\n\nInitialize an [AuthCredential](./auth.authcredential.md#authcredential_class) using an email and password.\n\n**Signature:** \n\n static credential(email: string, password: string): EmailAuthCredential;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------|------------------------|\n| email | string | Email address. |\n| password | string | User account password. |\n\n**Returns:**\n\n[EmailAuthCredential](./auth.emailauthcredential.md#emailauthcredential_class)\n\nThe auth provider credential.\n\n### Example 1\n\n const authCredential = EmailAuthProvider.credential(email, password);\n const userCredential = await signInWithCredential(auth, authCredential);\n\n### Example 2\n\n const userCredential = await signInWithEmailAndPassword(auth, email, password);\n\nEmailAuthProvider.credentialWithLink()\n--------------------------------------\n\nInitialize an [AuthCredential](./auth.authcredential.md#authcredential_class) using an email and an email link after a sign in with email link operation.\n\n**Signature:** \n\n static credentialWithLink(email: string, emailLink: string): EmailAuthCredential;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------|---------------------|\n| email | string | Email address. |\n| emailLink | string | Sign-in email link. |\n\n**Returns:**\n\n[EmailAuthCredential](./auth.emailauthcredential.md#emailauthcredential_class)\n\n- The auth provider credential.\n\n### Example 1\n\n const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);\n const userCredential = await signInWithCredential(auth, authCredential);\n\n### Example 2\n\n await sendSignInLinkToEmail(auth, email);\n // Obtain emailLink from user.\n const userCredential = await signInWithEmailLink(auth, email, emailLink);"]]