BBIO-46 finished
This commit is contained in:
parent
6ae8333d25
commit
38c5f2f67e
15
src/App.vue
15
src/App.vue
@ -5,14 +5,6 @@ import {clearSession} from "./store.js";
|
|||||||
import {Modal} from "bootstrap";
|
import {Modal} from "bootstrap";
|
||||||
import { getOidcUserManager } from './util/oidc';
|
import { getOidcUserManager } from './util/oidc';
|
||||||
|
|
||||||
/**
|
|
||||||
* Logout the user.
|
|
||||||
*/
|
|
||||||
function logOut() {
|
|
||||||
clearSession();
|
|
||||||
getOidcUserManager().signoutRedirect();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove error alert from the screen.
|
* Remove error alert from the screen.
|
||||||
*/
|
*/
|
||||||
@ -26,9 +18,7 @@ function dismissError() {
|
|||||||
<header class="sticky-top">
|
<header class="sticky-top">
|
||||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="/">
|
<img alt="basebox logo" class="logo" src="@/assets/img/basebox_logo.svg" />
|
||||||
<img alt="basebox logo" class="logo" src="@/assets/img/basebox_logo.svg" />
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<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>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
@ -48,9 +38,6 @@ function dismissError() {
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav mb-2 mb-lg-0">
|
<ul class="navbar-nav mb-2 mb-lg-0">
|
||||||
<li class="navbar-text">Hello, {{ store.userDisplayName }}!</li>
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@ import { Log, UserManager, WebStorageStateStore } from 'oidc-client-ts';
|
|||||||
Log.logger = console;
|
Log.logger = console;
|
||||||
Log.level = (process.env.NODE_ENV === 'production') ? Log.ERROR : Log.DEBUG;
|
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 oidcProviderDomain = 'https://basebox-test-1.eu.auth0.com';
|
||||||
const clientId = '5wl8hQV1thh07rScSoJ3aN56ETuXWprg';
|
const clientId = '5wl8hQV1thh07rScSoJ3aN56ETuXWprg';
|
||||||
const clientSecret = 'QlHMvIffKLRviCcSu_bPQcf8e4dc6WeS3BwZE1r1F-9R30AFoeYEwaOazAuFenI5';
|
const clientSecret = 'QlHMvIffKLRviCcSu_bPQcf8e4dc6WeS3BwZE1r1F-9R30AFoeYEwaOazAuFenI5';
|
||||||
|
Loading…
Reference in New Issue
Block a user