refactor: improve type annotations in services and config
Some checks failed
CI / Get Changed Files (pull_request) Successful in 6s
CI / prettier (pull_request) Successful in 23s
CI / Checkstyle Main (pull_request) Successful in 31s
CI / eslint (pull_request) Successful in 1m30s
CI / test-build (pull_request) Failing after 1m43s

This commit is contained in:
Jan K9f 2025-04-02 16:15:31 +02:00
commit d3b7e7d5e7
Signed by: jank
GPG key ID: B9F475106B20F144
3 changed files with 7 additions and 5 deletions

View file

@ -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);