@auth0/oidc-implicit-flow
v0.0.1-alpha.4
Published
Simple implicit flow library for oidc compliant clients and servers
Downloads
25
Maintainers
Readme
simple.oidc
cdn link
https://unpkg.com/@auth0/oidc-implicit-flow/dist/oidc-implicit-flow.production.js
$(() => {
var oidc = new OIDCImplicitFlow({
domain: "brucke.auth0.com",
client_id: "k5u3o2fiAA8XweXEEX604KCwCjzjtMU6",
redirect_uri: "http://localhost:3000",
appState: { redirect: "/somewhere" }
});
$("#login").click(() => {
oidc.login();
});
$("#callback").click(() => {
oidc.handleLoginCallback();
window.location.hash = "";
});
$("#userinfo").click(async () => {
const info = await oidc.getUserInfo();
console.log(info);
});
$("#accesstoken").click(async () => {
const accessToken = await oidc.getAccessToken();
console.log(accessToken);
});
$("#isloggedin").click(async () => {
const isLoggedIn = await oidc.isLoggedIn();
console.log(isLoggedIn);
});
$("#logout").click(() => {
oidc.logout();
});
});
running the project
yarn install
yarn dev