Fix logout redirect

This commit is contained in:
shamoon
2023-11-30 19:52:32 -08:00
parent 8c206f35c8
commit b3941ddecf
2 changed files with 2 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ export class UsersAndGroupsComponent
$localize`Password has been changed, you will be logged out momentarily.`
)
setTimeout(() => {
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/`
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
}, 2500)
} else {
this.toastService.showInfo(

View File

@@ -137,14 +137,13 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe({
next: () => {
console.log('next', passwordChanged)
this.toastService.showInfo($localize`Profile updated successfully`)
if (passwordChanged) {
this.toastService.showInfo(
$localize`Password has been changed, you will be logged out momentarily.`
)
setTimeout(() => {
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/`
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
}, 2500)
}
this.activeModal.close()