Added sign up button and improved logout flow.

Also added proper link to profile management.
This commit is contained in:
2021-07-12 03:06:13 -05:00
parent 9e55b459fc
commit c597d65256
11 changed files with 127 additions and 27 deletions

View File

@@ -0,0 +1,13 @@
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();

View File

@@ -0,0 +1,16 @@
<!-- Completely separate static html should improve silent login performance as we don't need to load entire SPA. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>authentication</title>
<script type="module" src="callback-handler.js"></script>
</head>
<body>
<div>
Silently authenticating user. If you are seeing this page, you probably want to <a href="/">go back to the app</a>.
</div>
</body>
</html>