File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 852
852
</ form >
853
853
</ div >
854
854
< div class ="tab-pane " id ="tab-byo-ciam-content ">
855
- < div id ="firebase-token-status "> No CIAM token found. User not logged in.</ div >
856
855
< h2 > Sign in with your CIAM token</ h2 >
857
856
< input type ="text " id ="byo-ciam-token "
858
857
class ="form-control " placeholder ="Enter CIAM token " />
859
858
< button class ="btn btn-block btn-primary "
860
859
id ="exchange-token ">
861
860
Exchange Token
862
861
</ button >
862
+ < pre id ="byo-ciam-result "> </ pre >
863
863
</ div >
864
864
< div class ="tab-pane " id ="logs-section ">
865
865
< pre class ="well logs "> </ pre >
Original file line number Diff line number Diff line change @@ -1520,15 +1520,16 @@ async function exchangeCIAMToken(token) {
1520
1520
function onExchangeToken ( event ) {
1521
1521
event . preventDefault ( ) ;
1522
1522
const byoCiamInput = document . getElementById ( 'byo-ciam-token' ) ;
1523
- const firebaseTokenStatus = document . getElementById ( 'firebase-token-status' ) ;
1523
+ const byoCiamResult = document . getElementById ( 'byo-ciam-result' ) ;
1524
+
1525
+ byoCiamResult . textContent = 'Exchanging token...' ;
1524
1526
1525
1527
exchangeCIAMToken ( byoCiamInput . value )
1526
1528
. then ( response => {
1527
- firebaseTokenStatus . textContent = '✅ Firebase token is set: ' + response ;
1529
+ byoCiamResult . textContent = response ;
1528
1530
console . log ( 'Token:' , response ) ;
1529
1531
} )
1530
1532
. catch ( error => {
1531
- ( firebaseTokenStatus . textContent = 'Error exchanging token: ' ) , error ;
1532
1533
console . error ( 'Error exchanging token:' , error ) ;
1533
1534
} ) ;
1534
1535
}
@@ -2090,18 +2091,6 @@ function initApp() {
2090
2091
tenantConfig : tenantConfig
2091
2092
} ) ;
2092
2093
2093
- if ( regionalAuth . onFirebaseTokenChanged ) {
2094
- regionalAuth . onFirebaseTokenChanged ( token => {
2095
- if ( token ) {
2096
- firebaseTokenStatus . textContent =
2097
- '✅ Firebase token is set: ' + token . token ;
2098
- } else {
2099
- firebaseTokenStatus . textContent =
2100
- 'No CIAM token found. User not logged in.' ;
2101
- }
2102
- } ) ;
2103
- }
2104
-
2105
2094
tempApp = initializeApp (
2106
2095
{
2107
2096
apiKey : config . apiKey ,
You can’t perform that action at this time.
0 commit comments