props/MultiShop/client/src/services/authentication.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

23 lines
712 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 }),
});
const identityPaths = {
Manage: "Identity/Account/Manage",
Register: "/Identity/Account/Register"
};
const identityQueryParameters = {
ReturnUrl: "returnUrl",
};
export { userManager, identityPaths, identityQueryParameters };