refactor(auth): clean up login and logout logic
Some checks failed
CI / Get Changed Files (pull_request) Successful in 7s
CI / eslint (pull_request) Successful in 25s
CI / test-build (pull_request) Successful in 32s
CI / prettier (pull_request) Failing after 59s
CI / Checkstyle Main (pull_request) Successful in 1m29s

This commit is contained in:
Jan K9f 2025-04-02 16:33:28 +02:00
commit 0e1946d190
Signed by: jank
GPG key ID: B9F475106B20F144
2 changed files with 19 additions and 19 deletions

View file

@ -17,13 +17,7 @@ export default class LoginSuccessComponent implements OnInit {
private router: Router = inject(Router);
async ngOnInit() {
try {
// Handle code flow without throwing errors
const success = await this.oauthService.loadDiscoveryDocumentAndTryLogin();
// If we have a valid access token, the user should be loaded in AuthService
const user = this.authService.getUser();
// Check if we're authenticated
if (this.oauthService.hasValidAccessToken()) {