Added sign up button and improved logout flow.
Also added proper link to profile management.
This commit is contained in:
13
MultiShop/client/public/authentication/callback-handler.js
Normal file
13
MultiShop/client/public/authentication/callback-handler.js
Normal 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();
|
@@ -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>
|
Reference in New Issue
Block a user