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

[Bug]: forceRefreshSession does not reset storageSilentRenewRunning #1942

Closed
Yberion opened this issue May 17, 2024 · 0 comments · Fixed by #1943
Closed

[Bug]: forceRefreshSession does not reset storageSilentRenewRunning #1942

Yberion opened this issue May 17, 2024 · 0 comments · Fixed by #1943

Comments

@Yberion
Copy link
Contributor

Yberion commented May 17, 2024

Version

17.0.0

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

When using forceRefreshSession it set storageSilentRenewRunning in the storage.

The problem is that when the refresh finish, the value is not reset, meaning that we can't re-use the forceRefreshSession.

Currently, when using forceRefreshSession, the only way that storageSilentRenewRunning is reset is to wait for the periodicallyCheck (https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/callback/periodically-token-check.service.ts#L105).

This also mean that if we set tokenRefreshInSeconds: 60, we will have to wait a lot of time before being able to re-use forceRefreshSession.

I'm using this function to refresh the session when I update the user's profile. The user object in my app is constructed with the userData that I get from event UserDataChanged.

Steps to reproduce the behavior

A clear and concise description of what you expected to happen.

Once forceRefreshSession is called, it should call resetSilentRenewRunning.

Additional context

I will provide a PR.

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 a pull request may close this issue.

1 participant