Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Start session checks in auto-login guard when already authenticated #1137

Conversation

liamkeaton
Copy link
Contributor

@liamkeaton liamkeaton commented Jun 14, 2021

Suggested fix for #1107 where silent renew was not being performed as
the session checks are only started when CheckAuthService::checkAuth
is called. Making CheckAuthService::startCheckSessionAndValidation
public is not ideal but reduces duplication of this logic.

Suggested fix for damienbod#1107 where silent renew was not being performed as
the session checks are only started when `CheckAuthService::checkAuth`
is called. Making `CheckAuthService::startCheckSessionAndValidation` is
not ideal but reduces duplication of this logic.
@FabianGosebrink
Copy link
Collaborator

Thanks for the PR. We would start the silent renew kickoff every time the user hits the route and is authenticated or presses refresh in the browser on a guarded route, is that correct?

@liamkeaton
Copy link
Contributor Author

Yes it tries to start the periodic session check and validation in PeriodicallyTokenCheckService::startTokenValidationPeriodically but if already running would return at this point https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/callback/periodically-token-check.service.ts#L35. From some initial tests it does not seem to have any adverse effects as everything in CheckAuthService::startCheckSessionAndValidation has isRunning checks.

@damienbod
Copy link
Owner

hi @liamkeaton Thanks for the PR!

I'm not sure if this is good, need to understand the auto-login better. @FabianGosebrink @JerrettDavis What's your opinion here?

Greetings Damien

PS we will probably move the V12 branch to main which has a few changes.

@liamkeaton
Copy link
Contributor Author

Thanks @damienbod & @FabianGosebrink for looking at my PR, I've seen that #1144 should fix the issues I've seen so my suggestion can be closed now. Any idea when this will be released?

@FabianGosebrink
Copy link
Collaborator

Thanks for this comment. We are currently in a testing phase. And will release afterwards. The next weeks I think :)

@liamkeaton liamkeaton closed this Jun 21, 2021
@liamkeaton liamkeaton deleted the lk/start-session-checks-in-auto-login branch June 21, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants