From 74fd2643b43057c25558b3da79398efe104e2660 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Nov 2020 15:36:43 +0100 Subject: Provide express request to onLogout call + pluginInfo related changes --- client/src/app/core/auth/auth.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 3410c5a6f..fd6062d3f 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts @@ -167,9 +167,13 @@ Ensure you have correctly configured PeerTube (config/ directory), in particular const authHeaderValue = this.getRequestHeaderValue() const headers = new HttpHeaders().set('Authorization', authHeaderValue) - this.http.post(AuthService.BASE_REVOKE_TOKEN_URL, {}, { headers }) + this.http.post<{ redirectUrl?: string }>(AuthService.BASE_REVOKE_TOKEN_URL, {}, { headers }) .subscribe( - () => { /* nothing to do */ }, + res => { + if (res.redirectUrl) { + window.location.href = res.redirectUrl + } + }, err => console.error(err) ) -- cgit v1.2.3