Fixed a silent login callback error and reworked project structure.

This commit is contained in:
2021-07-14 01:15:04 -05:00
parent bad22090a3
commit 840b59fcba
24 changed files with 72 additions and 63 deletions

View File

@@ -1,13 +0,0 @@
import { UserManager, WebStorageStateStore } from "oidc-client";
const userManager = new UserManager({
authority: window.location.origin,
client_id: "Props",
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

@@ -1,16 +1,18 @@
<!-- 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>.
Processing... If you're seeing this, you may want to <a href="/">go back to the app</a>.
</div>
</body>
</html>