Remove defaultAuthStatus from all environment configurations.
This commit is contained in:
@@ -5,19 +5,18 @@ import {catchError, tap} from 'rxjs/operators';
|
||||
import {MatSnackBar} from '@angular/material/snack-bar';
|
||||
import {JwtHelperService} from '@auth0/angular-jwt';
|
||||
import {JwtClaims} from '@custom-types/jwt_interface'
|
||||
import {environment} from '@environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AuthService {
|
||||
private isAuthenticatedSubject = new BehaviorSubject<boolean>(environment.defaultAuthStatus);
|
||||
private isAuthenticatedSubject = new BehaviorSubject<boolean>(false);
|
||||
public isAuthenticated$ = this.isAuthenticatedSubject.asObservable();
|
||||
|
||||
private userClaimsSubject = new BehaviorSubject<JwtClaims | null>(null);
|
||||
public userClaims$ = this.userClaimsSubject.asObservable();
|
||||
private jwtHelper = new JwtHelperService();
|
||||
private _username = signal<string | null>(environment.defaultAuthStatus ? 'akastijn' : null);
|
||||
private _username = signal<string | null>(null);
|
||||
public readonly username = this._username.asReadonly();
|
||||
|
||||
constructor(
|
||||
@@ -136,9 +135,6 @@ export class AuthService {
|
||||
}
|
||||
|
||||
public getUuid(): string | null {
|
||||
if (environment.defaultAuthStatus) {
|
||||
return '55e46bc3-2a29-4c53-850f-dbd944dc5c5f';
|
||||
}
|
||||
const jwtClaims = this.userClaimsSubject.getValue();
|
||||
if (jwtClaims === null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user