Last active
October 26, 2018 14:06
-
-
Save alx-andru/922e13bdd4ac7708784ad6268325502f to your computer and use it in GitHub Desktop.
Example signout-callback.html to be used with ng-oidc-client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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