From 762f80d624fa2a92556c60ede949fb54f39a9c8f Mon Sep 17 00:00:00 2001 From: Bradley Hart Date: Thu, 20 Feb 2020 10:25:20 -0500 Subject: [PATCH] Single authenticator initialization --- src/components/provider/UALProvider.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/provider/UALProvider.js b/src/components/provider/UALProvider.js index 0ed58adf..a77553fb 100644 --- a/src/components/provider/UALProvider.js +++ b/src/components/provider/UALProvider.js @@ -112,8 +112,6 @@ export class UALProvider extends Component { * @return {Void} */ showModal: () => { - const { availableAuthenticators } = this.state - availableAuthenticators.forEach(auth => auth.reset()) this.setState({ modal: true }) }, /** @@ -229,8 +227,8 @@ export class UALProvider extends Component { const type = window.localStorage.getItem('UALLoggedInAuthType') const accountName = window.localStorage.getItem('UALAccountName') const ual = new UAL(chains, appName, authenticators) + const { availableAuthenticators, autoLoginAuthenticator } = ual.getAuthenticators() try { - const { availableAuthenticators } = ual.getAuthenticators() if (type) { const authenticator = this.getAuthenticatorInstance(type, availableAuthenticators) if (!authenticator) { @@ -255,7 +253,6 @@ export class UALProvider extends Component { const errType = UALErrorType.Login console.warn(new UALError(msg, errType, e, source)) } finally { - const { availableAuthenticators, autoLoginAuthenticator } = ual.getAuthenticators() this.fetchAuthenticators(availableAuthenticators, autoLoginAuthenticator) } }