Skip to content

Commit

Permalink
Fix typo in useremail (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
peili authored May 17, 2022
1 parent 191d723 commit c08f1e4
Showing 1 changed file with 32 additions and 28 deletions.
60 changes: 32 additions & 28 deletions auth/email_action_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit c08f1e4

Please sign in to comment.