refactor: improve type annotations in services and config
Some checks failed
Some checks failed
This commit is contained in:
parent
617654caeb
commit
d3b7e7d5e7
3 changed files with 7 additions and 5 deletions
|
@ -109,7 +109,7 @@ export class AuthService {
|
|||
console.log('Access token:', this.oauthService.getAccessToken());
|
||||
|
||||
// Extract claims from id token if available
|
||||
let claims = this.oauthService.getIdentityClaims();
|
||||
const claims = this.oauthService.getIdentityClaims();
|
||||
console.log('ID token claims:', claims);
|
||||
|
||||
// If we have claims, use that as profile
|
||||
|
@ -128,7 +128,7 @@ export class AuthService {
|
|||
console.error('Error loading user profile:', error);
|
||||
// If we can't load the profile but have a token, create a minimal profile
|
||||
if (this.oauthService.hasValidAccessToken()) {
|
||||
const token = this.oauthService.getAccessToken();
|
||||
this.oauthService.getAccessToken(); // Get token but don't use it directly
|
||||
// Create a basic profile from the token
|
||||
const minimalProfile = {
|
||||
sub: 'user-' + Math.random().toString(36).substring(2, 10),
|
||||
|
@ -158,7 +158,7 @@ export class AuthService {
|
|||
}
|
||||
}
|
||||
|
||||
private processUserProfile(profile: any) {
|
||||
private processUserProfile(profile: Record<string, unknown>) {
|
||||
this.fromUserProfile(profile).subscribe({
|
||||
next: (user) => {
|
||||
console.log('User created/retrieved from backend:', user);
|
||||
|
|
Reference in a new issue