Skip to content

Instantly share code, notes, and snippets.

@thivi
Last active November 12, 2021 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thivi/4a865b8674f5160da0ff5eb2c59182fd to your computer and use it in GitHub Desktop.
Save thivi/4a865b8674f5160da0ff5eb2c59182fd to your computer and use it in GitHub Desktop.
window.onload = function () {
auth.on("sign-in", function () {
document.getElementById("unauthenticated").style.display = "none";
document.getElementById("authenticated").style.display = "block";
});
auth.initialize({
signInRedirectURL: "http://localhost:5000",
signOutRedirectURL: "http://localhost:5000",
clientID: "<client-id>",
serverOrigin: "https://api.asgardeo.io/t/<tenant>",
scope: ["openid", "profile"]
});
auth.signIn({ callOnlyOnRedirect: true });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment