Rename return URL to redirect URL in log out action
This commit is contained in:
parent
d6bbe73db0
commit
e0a3911851
|
@ -13,11 +13,11 @@
|
||||||
If you don't enter a value, you'll be redirected to the login screen.
|
If you don't enter a value, you'll be redirected to the login screen.
|
||||||
</Body>
|
</Body>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<Label small>Return URL</Label>
|
<Label small>Redirect URL</Label>
|
||||||
<DrawerBindableInput
|
<DrawerBindableInput
|
||||||
title="Return URL"
|
title="Return URL"
|
||||||
value={parameters.returnUrl}
|
value={parameters.redirectUrl}
|
||||||
on:change={value => (parameters.returnUrl = value.detail)}
|
on:change={value => (parameters.redirectUrl = value.detail)}
|
||||||
{bindings}
|
{bindings}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -114,13 +114,15 @@ const refreshDataProviderHandler = async (action, context) => {
|
||||||
|
|
||||||
const logoutHandler = async action => {
|
const logoutHandler = async action => {
|
||||||
await authStore.actions.logOut()
|
await authStore.actions.logOut()
|
||||||
let returnUrl = "/builder/auth/login"
|
let redirectUrl = "/builder/auth/login"
|
||||||
let internal = false
|
let internal = false
|
||||||
if (action.parameters.returnUrl) {
|
if (action.parameters.redirectUrl) {
|
||||||
internal = action.parameters.returnUrl?.startsWith("/")
|
internal = action.parameters.redirectUrl?.startsWith("/")
|
||||||
returnUrl = routeStore.actions.createFullURL(action.parameters.returnUrl)
|
redirectUrl = routeStore.actions.createFullURL(
|
||||||
|
action.parameters.redirectUrl
|
||||||
|
)
|
||||||
}
|
}
|
||||||
window.location.href = returnUrl
|
window.location.href = redirectUrl
|
||||||
if (internal) {
|
if (internal) {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue