Add JWT support for authentication handling
Integrate `@auth0/angular-jwt` for Token management. Update `app.config.ts` with `JwtModule` setup and token getter from cookies. Enhance `AuthService` to include token handling, fake login, and JWT validation using `JwtHelperService`. Introduce `JwtClaims` interface for structured token claims.
This commit is contained in:
@@ -53,7 +53,8 @@ export class LoginDialogComponent {
|
||||
return;
|
||||
}
|
||||
this.snackBar.open('Logging in...', '', {duration: 2000});
|
||||
this.authService.login(this.loginForm.value.code).subscribe({
|
||||
// this.authService.login(this.loginForm.value.code).subscribe({
|
||||
this.authService.fakeLogin().subscribe({
|
||||
next: (jwt) => {
|
||||
this.dialogRef.close(jwt);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user