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

[improvement] Move session refresh logic to Application level #6135

Merged
merged 3 commits into from
May 8, 2024

Conversation

JayaShakthi97
Copy link
Contributor

Purpose

Session refresh logic is moved to the Console application level. And disabled from the SDK. Improvement is done to avoid sending session refresh calls when the user is inactive.

Related Issues

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified.
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@wso2-jenkins-bot
Copy link
Contributor

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

@@ -73,7 +73,7 @@ export class AuthenticateUtils {
responseMode: window["AppUtils"]?.getConfig()?.idpConfigs?.responseMode ?? responseModeFallback,
scope: window["AppUtils"]?.getConfig()?.idpConfigs?.scope ?? [ TokenConstants.SYSTEM_SCOPE ],
sendCookiesInRequests: true,
sessionRefreshInterval: window[ "AppUtils" ]?.getConfig()?.session?.sessionRefreshTimeOut,
sessionRefreshInterval: -1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this expected?

Copy link
Contributor Author

@JayaShakthi97 JayaShakthi97 May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to disable the session refresh from SDK. We can't pass undefined as SDK has a fallback value defined.

https://github.com/asgardeo/asgardeo-auth-spa-sdk/blob/3b874cdb57f203cb006e407c9ad899d0e59813fc/lib/src/helpers/authentication-helper.ts#L102

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be an option in the SDK to disable session refresh interval right?
Shall we create an issue in the SDK for this and move forward with the workaround for the timebeing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

4 participants