Home > @firebase/auth > sendEmailVerification
sendEmailVerification() function
Sends a verification email to a user.
Signature:
export declare function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
user | User | The user. |
actionCodeSettings | ActionCodeSettings | null | The ActionCodeSettings. |
Returns:
Promise<void>
Description
The verification process is completed by calling applyActionCode().
Example
const actionCodeSettings = {
url: 'https://www.example.com/?email=user@example.com',
iOS: {
bundleId: 'com.example.ios'
},
android: {
packageName: 'com.example.android',
installApp: true,
minimumVersion: '12'
},
handleCodeInApp: true
};
await sendEmailVerification(user, actionCodeSettings);
// Obtain code from the user.
await applyActionCode(auth, code);