Skip to content

Fix typo in useremail #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 'user@example.com';
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 = 'user@example.com';
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 = 'user@example.com';
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 = 'user@example.com';
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