Skip to content

Commit 6c30959

Browse files
committed
Removing double quotes, adding admin import
Removing any double quotes and adding an admin import statement to the top of the file to resolve Travis CI build failure.
1 parent b2ba797 commit 6c30959

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

auth/create_custom_tokens.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'use strict';
2+
const admin = require('firebase-admin');
3+
14
// Initialize the Admin app with the default appication credentials
25
// [START initialize_sdk_with_default_config]
36
admin.initializeApp();
@@ -11,28 +14,28 @@ admin.initializeApp({
1114
// [END initialize_sdk_with_service_account_id]
1215

1316
// [START custom_token]
14-
var uid = "some-uid";
17+
var uid = 'some-uid';
1518

1619
admin.auth().createCustomToken(uid)
1720
.then(function(customToken) {
1821
// Send token back to client
1922
})
2023
.catch(function(error) {
21-
console.log("Error creating custom token:", error);
24+
console.log('Error creating custom token:', error);
2225
});
2326
// [END custom_token]
2427

2528
// [START custom_token_with_claims]
26-
var uid = "some-uid";
29+
var userId = 'some-uid';
2730
var additionalClaims = {
2831
premiumAccount: true
2932
};
3033

31-
admin.auth().createCustomToken(uid, additionalClaims)
34+
admin.auth().createCustomToken(userId, additionalClaims)
3235
.then(function(customToken) {
3336
// Send token back to client
3437
})
3538
.catch(function(error) {
36-
console.log("Error creating custom token:", error);
39+
console.log('Error creating custom token:', error);
3740
});
3841
// [END custom_token_with_claims]

0 commit comments

Comments
 (0)