refactor(user): clean up comments and rename variables
All checks were successful
All checks were successful
This commit is contained in:
parent
25c68e230d
commit
02453449cd
5 changed files with 4 additions and 41 deletions
|
@ -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']);
|
||||
|
|
Reference in a new issue