Refresh auth token if user is actively using the Atlas UI#3002
Refresh auth token if user is actively using the Atlas UI#3002chrisknoll merged 2 commits intoOHDSI:masterfrom
Conversation
|
Thanks for the contribution. I've done a little work looking at the refresh token mechanics. It seems that we don't need to refresh the token until the timeout has elapsed on the session token. I think you'll find in the codebase where we do a check to see if the refresh token is about to expire, then it will use the refresh token to reset the timeout. I think this block of code captures the logic: Instead of refreshing the token on every 30 user interactions (which is actually a crazy amount of refreshing if we are signaliing off each mouse move event), maybe we shoudl just simply check to see if the refreshToken is about to expire...if it is, then we can refresh the token. |
|
great catch @chrisknoll . I've updated the code according to your suggestion. Please take a look. |
Addresses #3001
Adds new listeners that detect user activity and refresh auth token if user is actively using the Atlas UI.