Last active
November 16, 2016 23:57
-
-
Save imeanitworks/8e09f8be9a962e36868e9277da777c88 to your computer and use it in GitHub Desktop.
This is the generic callback page that you can use to process the oauth redirect tokens
This file contains hidden or 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></title> | |
| </head> | |
| <body> | |
| <h1 id="waiting">Waiting...</h1> | |
| <div id="error"></div> | |
| <script type="text/javascript" src="oidc-client.min.js"></script> | |
| <script> | |
| new Oidc.UserManager().signinRedirectCallback().then(function (user) { | |
| if (user == null) { | |
| document.getElementById("waiting").style.display = "none"; | |
| document.getElementById("error").innerText = "No sign-in request pending."; | |
| } | |
| else { | |
| var path= window.location.pathname; | |
| path = path.substring(0, path.lastIndexOf("/") + 1); | |
| window.location = path; | |
| } | |
| }) | |
| .catch(function (er) { | |
| document.getElementById("waiting").style.display = "none"; | |
| document.getElementById("error").innerText = er.message; | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment