fix: avoid parsing access token on frontend during login (#1201)

This commit is contained in:
James Ward
2026-05-09 17:05:39 -04:00
committed by GitHub
parent da0d41bace
commit 60ffb09795
20 changed files with 170 additions and 117 deletions
@@ -164,7 +164,7 @@ describe('LoginComponent', () => {
it('navigates to change-password when the server marks the password as default', () => {
configureComponent();
authService.internalLogin.mockReturnValue(of({isDefaultPassword: 'true'}));
authService.internalLogin.mockReturnValue(of({isDefaultPassword: true}));
component.username = 'admin';
component.password = 'password';
@@ -175,7 +175,7 @@ describe('LoginComponent', () => {
it('navigates to the dashboard after a successful non-default-password login', () => {
configureComponent();
authService.internalLogin.mockReturnValue(of({isDefaultPassword: 'false'}));
authService.internalLogin.mockReturnValue(of({isDefaultPassword: false}));
component.username = 'admin';
component.password = 'password';
@@ -126,7 +126,7 @@ export class LoginComponent implements OnInit {
login(): void {
this.authService.internalLogin({username: this.username, password: this.password}).subscribe({
next: (response) => {
if (response.isDefaultPassword === 'true') {
if (response.isDefaultPassword) {
this.router.navigate(['/change-password']);
} else {
this.router.navigate(['/dashboard']);