asgardeo / asgardeo-auth-react-sdk

To maintain the implementation of Asgardeo React authentication SDK
Apache License 2.0
40 stars 91 forks source link

Introduce a config to disable periodic session refresh #226

Open JayaShakthi97 opened 6 months ago

JayaShakthi97 commented 6 months ago

Is your suggestion related to an experience ? Please describe.

With current implementation, for disabling periodic session refresh, -1 should be passed as the session refresh interval. This is because a fallback value has been defined as 300 seconds. If the session refresh interval is set to undefined, this fallback value will be considered rather than disabling the functionality. https://github.com/asgardeo/asgardeo-auth-spa-sdk/blob/3b874cdb57f203cb006e407c9ad899d0e59813fc/lib/src/helpers/authentication-helper.ts#L102

Describe the improvement

A dedicated config should be introduced to disable the periodic session refresh as it can be handled by the Application level according to the usecase.

Additional context

N/A