From: Chocobozzz Date: Wed, 4 Oct 2017 07:30:57 +0000 (+0200) Subject: Fix refresh token expired handling X-Git-Tag: v0.0.1-alpha~312 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=127d96b969891a73d76e257581e5fd81cd867480;p=oweals%2Fpeertube.git Fix refresh token expired handling --- diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 522efb23c..4a8814c4e 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts @@ -170,7 +170,7 @@ export class AuthService { .map(res => this.handleRefreshToken(res)) .catch(res => { // The refresh token is invalid? - if (res.status === 400 && res.error === 'invalid_grant') { + if (res.status === 400 && res.error.error === 'invalid_grant') { console.error('Cannot refresh token -> logout...') this.logout() this.router.navigate(['/login'])