refactor(auth): clean up login and logout logic
Some checks failed
Some checks failed
This commit is contained in:
parent
9de08ab233
commit
0e1946d190
2 changed files with 19 additions and 19 deletions
|
@ -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()) {
|
||||
|
|
Reference in a new issue