diff options
Diffstat (limited to 'client/src/app/login/login.component.ts')
-rw-r--r-- | client/src/app/login/login.component.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index 77703a80c..32dc9e36f 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts | |||
@@ -56,13 +56,11 @@ export class LoginComponent extends FormReactive implements OnInit { | |||
56 | this.authService.login(username, password).subscribe( | 56 | this.authService.login(username, password).subscribe( |
57 | result => this.router.navigate(['/videos/list']), | 57 | result => this.router.navigate(['/videos/list']), |
58 | 58 | ||
59 | error => { | 59 | err => { |
60 | console.error(error.json) | 60 | if (err.message === 'invalid_grant') { |
61 | |||
62 | if (error.json.error === 'invalid_grant') { | ||
63 | this.error = 'Credentials are invalid.' | 61 | this.error = 'Credentials are invalid.' |
64 | } else { | 62 | } else { |
65 | this.error = `${error.json.error}: ${error.json.error_description}` | 63 | this.error = `${err.body.error_description}` |
66 | } | 64 | } |
67 | } | 65 | } |
68 | ) | 66 | ) |