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

Skip to content

Conversation

@bradlhart
Copy link

Change Description

Due to multiple Authenticator initializations, the integration with Scatter was not working correctly. ual-reactjs-renderer was initializing the ual-scatter Authenticator three times, which was calling connect() multiple times to scatterjs-core. There was an issue with old websockets being closed but utilized in scatterjs (GetScatter/scatter-js#156) but that has since been resolved. Fixing the multiple initializations/connections on ual-reactjs-renderer's end here as well to avoid this issue in the future or with other Authenticators.

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

*/
showModal: () => {
const { availableAuthenticators } = this.state
availableAuthenticators.forEach(auth => auth.reset())
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.

What's the rationale for removing this line?

Copy link
Author

Choose a reason for hiding this comment

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

auth.reset() resets the authenticators to default and then calls the init method again, which adds to the initialization calls.

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.

Thanks. I see. A thing to keep in mind is the edge case where a developer would need their app to explicitly reset an active authenticator before calling showModal - otherwise the modal won't ever show up.

@bradlhart bradlhart merged commit 9d264b9 into develop Feb 26, 2020
@bradlhart bradlhart deleted the multiple-auth-init branch February 26, 2020 21:35
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.

3 participants