Merge branch 'main' into feature/authentik
Some checks failed
Some checks failed
This commit is contained in:
commit
d7fe0e3965
56 changed files with 2782 additions and 602 deletions
|
@ -1,7 +1,6 @@
|
|||
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '../../service/auth.service';
|
||||
import { User } from '../../model/User';
|
||||
import { OAuthService } from 'angular-oauth2-oidc';
|
||||
|
||||
@Component({
|
||||
|
@ -19,16 +18,16 @@ export default class LoginSuccessComponent implements OnInit {
|
|||
|
||||
async ngOnInit() {
|
||||
console.log('Login success component initialized');
|
||||
|
||||
|
||||
try {
|
||||
// Handle code flow without throwing errors
|
||||
const success = await this.oauthService.loadDiscoveryDocumentAndTryLogin();
|
||||
console.log('Manual login attempt result:', success);
|
||||
|
||||
|
||||
// If we have a valid access token, the user should be loaded in AuthService
|
||||
const user = this.authService.getUser();
|
||||
console.log('Login success user:', user);
|
||||
|
||||
|
||||
// Check if we're authenticated
|
||||
if (this.oauthService.hasValidAccessToken()) {
|
||||
console.log('Valid access token found');
|
||||
|
|
Reference in a new issue