Skip to content

Commit c55362d

Browse files
authored
Add clearSession button and function
Added a button to clear the user session.
1 parent 10a488b commit c55362d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

npachpande/cwc/sdb3/cwc_auth_1.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
</head>
66
<body>
77

8+
<button type="button" onclick="clearSession()">clearSession</button>
9+
810
<script type='text/javascript'>
911
async function fetchAndSetIdentityToken() {
1012
const identityTokenData = await fetchIdentityToken();
@@ -21,6 +23,9 @@
2123
});
2224
}
2325

26+
function clearSession() {
27+
embeddedservice_bootstrap.userVerificationAPI.clearSession(true);
28+
}
2429

2530
window.addEventListener("onEmbeddedMessagingReady", () => {
2631
console.log("Received the onEmbeddedMessagingReady event…");

0 commit comments

Comments
 (0)