fix(ops): la déconnexion ramène sur OPS après login (plus la page Authentik)
logout() ajoute `?next=<url OPS>` au flow d'invalidation Authentik : après déconnexion, Authentik renvoie vers erp.gigafibre.ca/ops → qui (non authentifié) redéclenche le login AVEC chemin de retour → après login on revient sur OPS, au lieu d'atterrir sur /if/user/#/library. Sans régression si Authentik ignore `next` (= comportement actuel). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
f5d8d38b1e
commit
01bcd6476d
|
|
@ -88,5 +88,9 @@ export async function getLoggedUser () {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function logout () {
|
export async function logout () {
|
||||||
window.location.href = 'https://auth.targo.ca/if/flow/default-invalidation-flow/'
|
// Déconnexion Authentik PUIS retour sur OPS : le flow d'invalidation honore `?next=` → il renvoie vers OPS,
|
||||||
|
// qui (non authentifié) redéclenche le login Authentik AVEC chemin de retour → après login on revient sur OPS,
|
||||||
|
// au lieu d'atterrir sur la page par défaut d'Authentik (/if/user/#/library).
|
||||||
|
const back = window.location.origin + (import.meta.env.BASE_URL || '/') // ex. https://erp.gigafibre.ca/ops/
|
||||||
|
window.location.href = 'https://auth.targo.ca/if/flow/default-invalidation-flow/?next=' + encodeURIComponent(back)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user