File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 853
853
</ div >
854
854
< div class ="tab-pane " id ="tab-byo-ciam-content ">
855
855
< h2 > Sign in with your CIAM token</ h2 >
856
+
857
+ <!-- Initialize Regional Auth -->
858
+ < div class ="group "> Initialize Regional Auth</ div >
856
859
< div class ="form-group ">
857
860
< label for ="tenant-id-input "> Tenant ID</ label >
858
861
< input type ="text " class ="form-control " id ="tenant-id-input " placeholder ="Enter Tenant ID ">
859
862
</ div >
860
863
< button class ="btn btn-primary " id ="initialize-regional-auth-btn "> Initialize Regional Auth</ button >
864
+ < div id ="regional-auth-status "> </ div >
861
865
< hr >
866
+
867
+ <!-- Set Token Refresh Handler -->
868
+ < div class ="group "> Set Token Refresh Handler</ div >
862
869
< button class ="btn btn-success " id ="set-successful-handler-btn "> Set Token Refresh Handler (Success)</ button >
863
870
< button class ="btn btn-danger " id ="set-failure-handler-btn "> Set Token Refresh Handler (Failure)</ button >
871
+ < div id ="token-handler-status "> </ div >
864
872
< hr >
873
+
874
+ <!-- Exchange Token -->
875
+ < div class ="group "> Exchange Token</ div >
865
876
< div id ="firebase-token-status "> No CIAM token found. User not logged in.</ div >
866
877
< input type ="text " id ="idp-config-id " class ="form-control " placeholder ="IDP Config ID " />
867
878
< input type ="text " id ="byo-ciam-token "
Original file line number Diff line number Diff line change @@ -1620,6 +1620,8 @@ function onInitializeRegionalAuthClick() {
1620
1620
popupRedirectResolver : browserPopupRedirectResolver ,
1621
1621
tenantConfig : tenantConfig
1622
1622
} ) ;
1623
+ $ ( '#regional-auth-status' ) . text ( '✅ regionalAuth is initialized' ) ;
1624
+ $ ( '#token-handler-status' ) . text ( 'Token refresh handler is not set.' ) ;
1623
1625
const handlerType = localStorage . getItem ( 'tokenRefreshHandlerType' ) ;
1624
1626
if ( handlerType === 'success' ) {
1625
1627
onSetSuccessfulHandlerClick ( ) ;
@@ -1688,6 +1690,7 @@ function onSetSuccessfulHandlerClick() {
1688
1690
const tokenRefreshHandler = new TokenRefreshHandlerImpl ( ) ;
1689
1691
regionalAuth . setTokenRefreshHandler ( tokenRefreshHandler ) ;
1690
1692
localStorage . setItem ( 'tokenRefreshHandlerType' , 'success' ) ;
1693
+ $ ( '#token-handler-status' ) . text ( '✅ Token refresh handler is set to success.' ) ;
1691
1694
}
1692
1695
1693
1696
function onSetFailureHandlerClick ( ) {
@@ -1703,6 +1706,7 @@ function onSetFailureHandlerClick() {
1703
1706
const tokenRefreshHandler = new TokenRefreshHandlerFailureImpl ( ) ;
1704
1707
regionalAuth . setTokenRefreshHandler ( tokenRefreshHandler ) ;
1705
1708
localStorage . setItem ( 'tokenRefreshHandlerType' , 'failure' ) ;
1709
+ $ ( '#token-handler-status' ) . text ( '✅ Token refresh handler is set to failure.' ) ;
1706
1710
}
1707
1711
1708
1712
/**
You can’t perform that action at this time.
0 commit comments