Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bradlhart
Copy link

@bradlhart bradlhart commented Feb 14, 2020

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

  • API Changes

Documentation Additions

  • Documentation Additions

@bradlhart bradlhart changed the title Checks whether the authenticator is autoLogin Adding an expiry time option for authenticators to allow for logged in sessions to expire Feb 14, 2020
@bradlhart bradlhart changed the title Adding an expiry time option for authenticators to allow for logged in sessions to expire Adding an invalidate time option for authenticators to require login in new browser sessions Feb 14, 2020
@bradlhart bradlhart marked this pull request as ready for review February 18, 2020 21:07
Copy link
Contributor

@jeffreyssmith2nd jeffreyssmith2nd left a 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();
Copy link
Contributor

@nasser85 nasser85 Feb 25, 2020

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?

Copy link
Author

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.

Copy link
Contributor

@nasser85 nasser85 left a 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!

@bradlhart bradlhart merged commit adc0d3a into develop Feb 26, 2020
@bradlhart bradlhart deleted the shouldAutoLogin-check branch February 26, 2020 21:31
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