Revert "Prompt login dialog when no JWT is found during authentication check."
This reverts commit e3fd0944df.
This commit is contained in:
parent
e697f7ca90
commit
5a4df2572d
|
|
@ -1,19 +1,15 @@
|
||||||
import {inject, Injectable, signal} from '@angular/core';
|
import {Injectable, signal} from '@angular/core';
|
||||||
import {LoginService} from '@api';
|
import {LoginService} from '@api';
|
||||||
import {Observable, throwError} from 'rxjs';
|
import {Observable, throwError} from 'rxjs';
|
||||||
import {catchError, tap} from 'rxjs/operators';
|
import {catchError, tap} from 'rxjs/operators';
|
||||||
import {MatSnackBar} from '@angular/material/snack-bar';
|
import {MatSnackBar} from '@angular/material/snack-bar';
|
||||||
import {JwtHelperService} from '@auth0/angular-jwt';
|
import {JwtHelperService} from '@auth0/angular-jwt';
|
||||||
import {JwtClaims} from '@custom-types/jwt_interface'
|
import {JwtClaims} from '@custom-types/jwt_interface'
|
||||||
import {LoginDialogComponent} from '@shared-components/login/login.component';
|
|
||||||
import {MatDialog} from '@angular/material/dialog';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class AuthService {
|
export class AuthService {
|
||||||
private dialog: MatDialog = inject(MatDialog)
|
|
||||||
|
|
||||||
private isAuthenticatedSubject = signal<boolean>(false);
|
private isAuthenticatedSubject = signal<boolean>(false);
|
||||||
public readonly isAuthenticated$ = this.isAuthenticatedSubject.asReadonly();
|
public readonly isAuthenticated$ = this.isAuthenticatedSubject.asReadonly();
|
||||||
|
|
||||||
|
|
@ -76,12 +72,6 @@ export class AuthService {
|
||||||
const jwt = this.getJwt();
|
const jwt = this.getJwt();
|
||||||
if (!jwt) {
|
if (!jwt) {
|
||||||
console.log("No JWT found");
|
console.log("No JWT found");
|
||||||
const dialogRef = this.dialog.open(LoginDialogComponent, {
|
|
||||||
width: '400px',
|
|
||||||
})
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user