Skip to content

Commit 8bd6944

Browse files
committed
Combine snippets
1 parent 9796c56 commit 8bd6944

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

auth/tenant_management.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function createTenant() {
99
displayName: 'myTenant1',
1010
emailSignInConfig: {
1111
enabled: true,
12-
passwordRequired: false, // Email link sign-in enabled.
12+
// Email link sign-in enabled.
13+
passwordRequired: false,
1314
},
1415
})
1516
.then((createdTenant) => {
@@ -26,8 +27,11 @@ function updateTenant() {
2627
admin.auth().tenantManager().updateTenant(tenantId, {
2728
displayName: 'updatedName',
2829
emailSignInConfig: {
29-
enabled: false, // Disable email provider.
30+
// Disable email provider.
31+
enabled: false,
3032
},
33+
// Enable anonymous sign-in
34+
anonymousSignInEnabled: true,
3135
})
3236
.then((updatedTenant) => {
3337
console.log(updatedTenant.toJSON());
@@ -62,20 +66,4 @@ function listAllTenants(nextPageToken) {
6266
}
6367
});
6468
}
65-
// [END auth_list_all_tentants]
66-
67-
68-
function enableAnonymousSignIn() {
69-
// [START auth_tenant_enable_anon]
70-
const manager = admin.auth().tenantManager();
71-
manager.updateTenant(tenantId, {
72-
anonymousSignInEnabled: true,
73-
})
74-
.then(function(tenant) {
75-
console.log('Successfully updated tenant: ', JSON.stringify(tenant));
76-
})
77-
.catch(function(error) {
78-
console.log('Error updating tenant: ', JSON.stringify(error));
79-
});
80-
// [END auth_tenant_enable_anon]
81-
}
69+
// [END auth_list_all_tentants]

0 commit comments

Comments
 (0)