Skip to content

Instantly share code, notes, and snippets.

@alx-andru
Last active October 26, 2018 14:06
Show Gist options
  • Save alx-andru/922e13bdd4ac7708784ad6268325502f to your computer and use it in GitHub Desktop.
Save alx-andru/922e13bdd4ac7708784ad6268325502f to your computer and use it in GitHub Desktop.
Example signout-callback.html to be used with ng-oidc-client
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Signout Callback</title>
<link rel="icon"
type="image/x-icon"
href="favicon.png">
<script src="oidc-client.min.js"
type="application/javascript"></script>
</head>
<body>
<script>
var Oidc = window.Oidc;
var isPopupCallback = JSON.parse(window.localStorage.getItem('ngoidc:isPopupCallback'));
if (isPopupCallback) {
new Oidc.UserManager(config).signoutPopupCallback();
} else {
new Oidc.UserManager(config).signoutRedirectCallback().then(test => {
window.location.href = '/';
});
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment