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.` $localize`Password has been changed, you will be logged out momentarily.`
) )
setTimeout(() => { 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) }, 2500)
} else { } else {
this.toastService.showInfo( this.toastService.showInfo(

View File

@@ -137,14 +137,13 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.unsubscribeNotifier)) .pipe(takeUntil(this.unsubscribeNotifier))
.subscribe({ .subscribe({
next: () => { next: () => {
console.log('next', passwordChanged)
this.toastService.showInfo($localize`Profile updated successfully`) this.toastService.showInfo($localize`Profile updated successfully`)
if (passwordChanged) { if (passwordChanged) {
this.toastService.showInfo( this.toastService.showInfo(
$localize`Password has been changed, you will be logged out momentarily.` $localize`Password has been changed, you will be logged out momentarily.`
) )
setTimeout(() => { 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) }, 2500)
} }
this.activeModal.close() this.activeModal.close()