-
Notifications
You must be signed in to change notification settings - Fork 36
Adding an invalidate time option for authenticators to require login in new browser sessions #82
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
Conversation
jeffreyssmith2nd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, may want one of the React devs to check it out as well if they are able.
| */ | ||
| checkForInvalidatedSession = (type, invalidate) => { | ||
| if (type && invalidate && new Date(invalidate) <= new Date()) { | ||
| this.clearCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this.state.logout() as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the login hasn't been started and activeAuthenticator isn't set yet at this point, logout causes an error.
nasser85
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question, but otherwise LGTM!
Change Description
Users that are already authenticated are re-logged in on refresh to emulate normal user sessions on other sites. Adding an optional invalidate time option for authenticators to cause users to re-authenticate after the time has elapsed and a new browser session occurs.
Resolves EOSIO/universal-authenticator-library#48
API Changes
Documentation Additions