mirror of
https://github.com/OpenBankProject/API-Explorer-II.git
synced 2026-02-06 10:47:04 +00:00
fix page redirect when logout
This commit is contained in:
parent
267cffba3b
commit
f4fa0e4ce9
@ -49,10 +49,17 @@ export class UserController {
|
||||
this.oauthInjectedService.requestTokenKey = undefined
|
||||
this.oauthInjectedService.requestTokenSecret = undefined
|
||||
session['clientConfig'] = undefined
|
||||
if(!this.obpExplorerHome) {
|
||||
console.error(`VITE_OBP_API_EXPLORER_HOST: ${this.obpExplorerHome}`)
|
||||
|
||||
if (request.query.redirect) {
|
||||
response.redirect(request.query.redirect as string)
|
||||
} else {
|
||||
if(!this.obpExplorerHome) {
|
||||
console.error(`VITE_OBP_API_EXPLORER_HOST: ${this.obpExplorerHome}`)
|
||||
}
|
||||
response.redirect(this.obpExplorerHome)
|
||||
}
|
||||
response.redirect(this.obpExplorerHome)
|
||||
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
@ -112,6 +112,12 @@ watchEffect(() => {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const getCurrentPath = () => {
|
||||
const currentPath = route.path
|
||||
return currentPath
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -157,11 +163,11 @@ watchEffect(() => {
|
||||
<arrow-down />
|
||||
</el-icon>
|
||||
</span>-->
|
||||
<a v-bind:href="'/api/connect?redirect='+ encodeURIComponent(route.path)" v-show="isShowLoginButton" class="login-button router-link">
|
||||
<a v-bind:href="'/api/connect?redirect='+ encodeURIComponent(getCurrentPath())" v-show="isShowLoginButton" class="login-button router-link">
|
||||
{{ $t('header.login') }}
|
||||
</a>
|
||||
<span v-show="isShowLogOffButton" class="login-user">{{ loginUsername }}</span>
|
||||
<a v-bind:href="'/api/user/logoff'" v-show="isShowLogOffButton" class="logoff-button router-link">
|
||||
<a v-bind:href="'/api/user/logoff?redirect=' + encodeURIComponent(getCurrentPath())" v-show="isShowLogOffButton" class="logoff-button router-link">
|
||||
{{ $t('header.logoff') }}
|
||||
</a>
|
||||
</RouterView>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user