BBIO-46 finished

This commit is contained in:
Markus Thielen 2023-11-01 17:34:45 +01:00
parent 6ae8333d25
commit 38c5f2f67e
2 changed files with 2 additions and 15 deletions

View File

@ -5,14 +5,6 @@ import {clearSession} from "./store.js";
import {Modal} from "bootstrap";
import { getOidcUserManager } from './util/oidc';
/**
* Logout the user.
*/
function logOut() {
clearSession();
getOidcUserManager().signoutRedirect();
}
/**
* Remove error alert from the screen.
*/
@ -26,9 +18,7 @@ function dismissError() {
<header class="sticky-top">
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img alt="basebox logo" class="logo" src="@/assets/img/basebox_logo.svg" />
</a>
<img alt="basebox logo" class="logo" src="@/assets/img/basebox_logo.svg" />
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
@ -48,9 +38,6 @@ function dismissError() {
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="navbar-text">Hello, {{ store.userDisplayName }}!</li>
<li class="nav-item ms-2">
<button class="nav-link btn btn-sm btn-secondary" @click="logOut()">Logout</button>
</li>
</ul>
</div>
</div>

View File

@ -11,7 +11,7 @@ import { Log, UserManager, WebStorageStateStore } from 'oidc-client-ts';
Log.logger = console;
Log.level = (process.env.NODE_ENV === 'production') ? Log.ERROR : Log.DEBUG;
// OIDC configuration
/* OpenID Connect Config */
const oidcProviderDomain = 'https://basebox-test-1.eu.auth0.com';
const clientId = '5wl8hQV1thh07rScSoJ3aN56ETuXWprg';
const clientSecret = 'QlHMvIffKLRviCcSu_bPQcf8e4dc6WeS3BwZE1r1F-9R30AFoeYEwaOazAuFenI5';