Skip to content

Commit c08f1e4

Browse files
authored
Fix typo in useremail (#177)
1 parent 191d723 commit c08f1e4

File tree

1 file changed

+32
-28
lines changed

1 file changed

+32
-28
lines changed

auth/email_action_links.js

+32-28
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,39 @@ getAuth()
3838
});
3939
// [END password_reset_link]
4040

41-
// [START email_verification_link]
42-
// Admin SDK API to generate the email verification link.
43-
const useremail = '[email protected]';
44-
getAuth()
45-
.generateEmailVerificationLink(useremail, actionCodeSettings)
46-
.then((link) => {
47-
// Construct email verification template, embed the link and send
48-
// using custom SMTP server.
49-
return sendCustomVerificationEmail(useremail, displayName, link);
50-
})
51-
.catch((error) => {
52-
// Some error occurred.
53-
});
54-
// [END email_verification_link]
41+
function emailVerificationLink() {
42+
// [START email_verification_link]
43+
// Admin SDK API to generate the email verification link.
44+
const useremail = '[email protected]';
45+
getAuth()
46+
.generateEmailVerificationLink(useremail, actionCodeSettings)
47+
.then((link) => {
48+
// Construct email verification template, embed the link and send
49+
// using custom SMTP server.
50+
return sendCustomVerificationEmail(useremail, displayName, link);
51+
})
52+
.catch((error) => {
53+
// Some error occurred.
54+
});
55+
// [END email_verification_link]
56+
}
5557

56-
// [START sign_in_with_email_link]
57-
// Admin SDK API to generate the sign in with email link.
58-
const usremail = '[email protected]';
59-
getAuth()
60-
.generateSignInWithEmailLink(usremail, actionCodeSettings)
61-
.then((link) => {
62-
// Construct sign-in with email link template, embed the link and
63-
// send using custom SMTP server.
64-
return sendSignInEmail(usremail, displayName, link);
65-
})
66-
.catch((error) => {
67-
// Some error occurred.
68-
});
69-
// [END sign_in_with_email_link]
58+
function signInWithEmailLink() {
59+
// [START sign_in_with_email_link]
60+
// Admin SDK API to generate the sign in with email link.
61+
const useremail = '[email protected]';
62+
getAuth()
63+
.generateSignInWithEmailLink(useremail, actionCodeSettings)
64+
.then((link) => {
65+
// Construct sign-in with email link template, embed the link and
66+
// send using custom SMTP server.
67+
return sendSignInEmail(useremail, displayName, link);
68+
})
69+
.catch((error) => {
70+
// Some error occurred.
71+
});
72+
// [END sign_in_with_email_link]
73+
}
7074

7175
let displayName;
7276
const sendSignInEmail = (...args) => {

0 commit comments

Comments
 (0)