-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,35 +38,39 @@ getAuth() | |
}); | ||
// [END password_reset_link] | ||
|
||
// [START email_verification_link] | ||
// Admin SDK API to generate the email verification link. | ||
const useremail = '[email protected]'; | ||
getAuth() | ||
.generateEmailVerificationLink(useremail, actionCodeSettings) | ||
.then((link) => { | ||
// Construct email verification template, embed the link and send | ||
// using custom SMTP server. | ||
return sendCustomVerificationEmail(useremail, displayName, link); | ||
}) | ||
.catch((error) => { | ||
// Some error occurred. | ||
}); | ||
// [END email_verification_link] | ||
function emailVerificationLink() { | ||
// [START email_verification_link] | ||
// Admin SDK API to generate the email verification link. | ||
const useremail = '[email protected]'; | ||
getAuth() | ||
.generateEmailVerificationLink(useremail, actionCodeSettings) | ||
.then((link) => { | ||
// Construct email verification template, embed the link and send | ||
// using custom SMTP server. | ||
return sendCustomVerificationEmail(useremail, displayName, link); | ||
}) | ||
.catch((error) => { | ||
// Some error occurred. | ||
}); | ||
// [END email_verification_link] | ||
} | ||
|
||
// [START sign_in_with_email_link] | ||
// Admin SDK API to generate the sign in with email link. | ||
const usremail = '[email protected]'; | ||
getAuth() | ||
.generateSignInWithEmailLink(usremail, actionCodeSettings) | ||
.then((link) => { | ||
// Construct sign-in with email link template, embed the link and | ||
// send using custom SMTP server. | ||
return sendSignInEmail(usremail, displayName, link); | ||
}) | ||
.catch((error) => { | ||
// Some error occurred. | ||
}); | ||
// [END sign_in_with_email_link] | ||
function signInWithEmailLink() { | ||
// [START sign_in_with_email_link] | ||
// Admin SDK API to generate the sign in with email link. | ||
const useremail = '[email protected]'; | ||
getAuth() | ||
.generateSignInWithEmailLink(useremail, actionCodeSettings) | ||
.then((link) => { | ||
// Construct sign-in with email link template, embed the link and | ||
// send using custom SMTP server. | ||
return sendSignInEmail(useremail, displayName, link); | ||
}) | ||
.catch((error) => { | ||
// Some error occurred. | ||
}); | ||
// [END sign_in_with_email_link] | ||
} | ||
|
||
let displayName; | ||
const sendSignInEmail = (...args) => { | ||
|