props/MultiShop/client/public/authentication/callback-handler.js
Harrison Deng c597d65256 Added sign up button and improved logout flow.
Also added proper link to profile management.
2021-07-12 03:10:00 -05:00

14 lines
508 B
JavaScript

import { UserManager, WebStorageStateStore } from "oidc-client";
const userManager = new UserManager({
authority: window.location.origin,
client_id: "MultiShop",
redirect_uri: window.location.origin + "/authentication/login-callback",
post_logout_redirect_uri: window.location.origin + "/authentication/logout-callback",
response_type: "code",
scope: "openid profile",
userStore: new WebStorageStateStore({ store: window.localStorage }),
});
userManager.signinSilentCallback();