Commit b5a660e9 authored by Janis Streib's avatar Janis Streib

FIX: possible navigation guard problem

parent 8153a622
Pipeline #119373 passed with stages
in 7 minutes and 49 seconds
<template>
<div class="login">
<h1>Logging in...</h1>
</div>
<div class="login">
<h1>Logging in...</h1>
</div>
</template>
<script>
......@@ -17,8 +17,11 @@ export default {
return
}
if (response.data.login != null) {
self.$store.commit('login', { user: response.data.login, token: response.data.token })
const redir = window.localStorage.getItem('oic_redir_after_login') || '/dnsvs/bcds'
self.$store.commit('login', {user: response.data.login, token: response.data.token})
let redir = window.localStorage.getItem('oic_redir_after_login') || '/dnsvs/bcds'
if (redir === '/login' || redir === '/oic_login') {
redir = '/dnsvs/bcds'
}
window.localStorage.removeItem('oic_redir_after_login')
self.$router.push(redir)
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment