refactor(user): clean up comments and rename variables
All checks were successful
CI / Get Changed Files (pull_request) Successful in 6s
CI / eslint (pull_request) Successful in 25s
CI / test-build (pull_request) Successful in 31s
CI / prettier (pull_request) Successful in 56s
CI / Checkstyle Main (pull_request) Successful in 2m12s

This commit is contained in:
Jan K9f 2025-04-03 11:51:55 +02:00
commit 02453449cd
Signed by: jank
GPG key ID: 22BEAC760B3333D6
5 changed files with 4 additions and 41 deletions

View file

@ -18,11 +18,9 @@ export default class LoginSuccessComponent implements OnInit {
async ngOnInit() {
try {
// Check if we're authenticated
if (this.oauthService.hasValidAccessToken()) {
this.router.navigate(['/home']);
} else {
// Wait a bit and check if we've been authenticated in the meantime
setTimeout(() => {
if (this.oauthService.hasValidAccessToken() || this.authService.getUser()) {
this.router.navigate(['/home']);
@ -33,7 +31,6 @@ export default class LoginSuccessComponent implements OnInit {
}
} catch (err) {
console.error('Error during login callback:', err);
// Wait a bit in case token processing is happening elsewhere
setTimeout(() => {
if (this.authService.isLoggedIn()) {
this.router.navigate(['/home']);