Skip to content

Commit fb88cd7

Browse files
committed
Revert changes to demo app to match gcip-byociam-web feature branch
1 parent b5796f0 commit fb88cd7

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

packages/auth/demo/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,14 +852,14 @@
852852
</form>
853853
</div>
854854
<div class="tab-pane" id="tab-byo-ciam-content">
855-
<div id="firebase-token-status">No CIAM token found. User not logged in.</div>
856855
<h2>Sign in with your CIAM token</h2>
857856
<input type="text" id="byo-ciam-token"
858857
class="form-control" placeholder="Enter CIAM token" />
859858
<button class="btn btn-block btn-primary"
860859
id="exchange-token">
861860
Exchange Token
862861
</button>
862+
<pre id="byo-ciam-result"></pre>
863863
</div>
864864
<div class="tab-pane" id="logs-section">
865865
<pre class="well logs"></pre>

packages/auth/demo/src/index.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,15 +1520,16 @@ async function exchangeCIAMToken(token) {
15201520
function onExchangeToken(event) {
15211521
event.preventDefault();
15221522
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...';
15241526

15251527
exchangeCIAMToken(byoCiamInput.value)
15261528
.then(response => {
1527-
firebaseTokenStatus.textContent = '✅ Firebase token is set: ' + response;
1529+
byoCiamResult.textContent = response;
15281530
console.log('Token:', response);
15291531
})
15301532
.catch(error => {
1531-
(firebaseTokenStatus.textContent = 'Error exchanging token: '), error;
15321533
console.error('Error exchanging token:', error);
15331534
});
15341535
}
@@ -2090,18 +2091,6 @@ function initApp() {
20902091
tenantConfig: tenantConfig
20912092
});
20922093

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-
21052094
tempApp = initializeApp(
21062095
{
21072096
apiKey: config.apiKey,

0 commit comments

Comments
 (0)