File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 229
229
</ button >
230
230
</ form >
231
231
232
+ <!-- Set Tenant -->
233
+ < div class ="group "> Set Tenant</ div >
234
+ < form class ="form form-bordered no-submit ">
235
+ < input type ="text " id ="set-tenant "
236
+ class ="form-control "
237
+ placeholder ="Tenant " />
238
+ < button class ="btn btn-block btn-primary "
239
+ id ="set-tenant-btn ">
240
+ Set Tenant
241
+ </ button >
242
+ </ form >
243
+
232
244
<!-- Sign up -->
233
245
< div class ="group "> Sign Up</ div >
234
246
< form class ="form form-bordered no-submit ">
Original file line number Diff line number Diff line change @@ -321,7 +321,14 @@ function onUseDeviceLanguage() {
321
321
$ ( '#language-code' ) . val ( auth . languageCode ) ;
322
322
alertSuccess ( 'Using device language "' + auth . languageCode + '".' ) ;
323
323
}
324
-
324
+ /**
325
+ * Set tenant id for the firebase project.
326
+ */
327
+ function onSetTenantIdClick ( _event ) {
328
+ const tenantId = $ ( '#set-tenant' ) . val ( ) ;
329
+ auth . tenantId = tenantId === '' ? null : tenantId ;
330
+ alertSuccess ( 'Tenant Id : ' + auth . tenantId ) ;
331
+ }
325
332
/**
326
333
* Changes the Auth state persistence to the specified one.
327
334
*/
@@ -2093,6 +2100,8 @@ function initApp() {
2093
2100
$ ( '#enroll-mfa-totp-start' ) . click ( onStartEnrollWithTotpMultiFactor ) ;
2094
2101
// Completes multi-factor enrollment with supplied OTP(One-Time Password).
2095
2102
$ ( '#enroll-mfa-totp-finalize' ) . click ( onFinalizeEnrollWithTotpMultiFactor ) ;
2103
+ // Sets tenant for the current auth instance
2104
+ $ ( '#set-tenant-btn' ) . click ( onSetTenantIdClick ) ;
2096
2105
}
2097
2106
2098
2107
$ ( initApp ) ;
You can’t perform that action at this time.
0 commit comments