Skip to content

Commit b97074f

Browse files
committed
Defining variables
Defining variables in custom_claims and removing repeat variable definitions
1 parent 26759b6 commit b97074f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

auth/custom_claims.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
const admin = require('firebase-admin');
33
admin.initializeApp();
44

5+
const uid = "firebaseUserId123";
6+
let idToken;
57
// [START set_custom_user_claims]
68
// Set admin privilege on the user corresponding to uid.
79

auth/email_action_links.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ admin.auth().generatePasswordResetLink(email, actionCodeSettings)
3737

3838
// [START email_verification_link]
3939
// Admin SDK API to generate the email verification link.
40-
const email = '[email protected]';
41-
admin.auth().generateEmailVerificationLink(email, actionCodeSettings)
40+
const useremail = '[email protected]';
41+
admin.auth().generateEmailVerificationLink(useremail, actionCodeSettings)
4242
.then((link) => {
4343
// Construct email verification template, embed the link and send
4444
// using custom SMTP server.
45-
return sendCustomVerificationEmail(email, displayName, link);
45+
return sendCustomVerificationEmail(useremail, displayName, link);
4646
})
4747
.catch((error) => {
4848
// Some error occurred.
@@ -51,12 +51,12 @@ admin.auth().generateEmailVerificationLink(email, actionCodeSettings)
5151

5252
// [START sign_in_with_email_link]
5353
// Admin SDK API to generate the sign in with email link.
54-
const email = '[email protected]';
55-
admin.auth().generateSignInWithEmailLink(email, actionCodeSettings)
54+
const usremail = '[email protected]';
55+
admin.auth().generateSignInWithEmailLink(usremail, actionCodeSettings)
5656
.then((link) => {
5757
// Construct sign-in with email link template, embed the link and
5858
// send using custom SMTP server.
59-
return sendSignInEmail(email, displayName, link);
59+
return sendSignInEmail(usremail, displayName, link);
6060
})
6161
.catch((error) => {
6262
// Some error occurred.

0 commit comments

Comments
 (0)