File tree 2 files changed +23
-1
lines changed
2 files changed +23
-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 @@ -314,7 +314,15 @@ function onUseDeviceLanguage() {
314
314
$ ( '#language-code' ) . val ( auth . languageCode ) ;
315
315
alertSuccess ( 'Using device language "' + auth . languageCode + '".' ) ;
316
316
}
317
-
317
+ /**
318
+ * Set tenant id for the firebase project.
319
+ */
320
+ function onSetTenantIdClick ( _event ) {
321
+ console . log ( 'onSetTenant called' ) ;
322
+ const tenantId = $ ( '#set-tenant' ) . val ( ) ;
323
+ auth . tenantId = tenantId === '' ? null : tenantId ;
324
+ alertSuccess ( 'Tenant Id : ' + auth . tenantId ) ;
325
+ }
318
326
/**
319
327
* Changes the Auth state persistence to the specified one.
320
328
*/
@@ -2032,6 +2040,8 @@ function initApp() {
2032
2040
$ ( '#enroll-mfa-totp-start' ) . click ( onStartEnrollWithTotpMultiFactor ) ;
2033
2041
// Completes multi-factor enrollment with supplied OTP(One-Time Password).
2034
2042
$ ( '#enroll-mfa-totp-finalize' ) . click ( onFinalizeEnrollWithTotpMultiFactor ) ;
2043
+ // Sets tenant for the current auth instance
2044
+ $ ( '#set-tenant-btn' ) . click ( onSetTenantIdClick ) ;
2035
2045
}
2036
2046
2037
2047
$ ( initApp ) ;
You can’t perform that action at this time.
0 commit comments