From ae1cb8dc28229c76b28eeed88ef18cdb44fe82a6 Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Wed, 3 Apr 2019 12:05:14 -0500 Subject: [PATCH] Dont process authentication if already authenticating, still 3.0.5 --- package-lock.json | 8 ++++---- package.json | 2 +- src/screens/Authentication/Authenticate.js | 2 +- .../Authentication/Sources/AuthenticationSource.js | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3057a359..4401de82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "StandardNotes", - "version": "3.0.4-beta1", + "version": "3.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -11746,9 +11746,9 @@ "integrity": "sha1-ATl5IuX2Ls8whFUiyVxP4dJefU4=" }, "standard-file-js": { - "version": "0.3.54", - "resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.54.tgz", - "integrity": "sha512-M7d4J83iZ7VzsmzrwvO7N3R3Jr6hmdvJinWLEi4emwKgqZCc8ExIxBVe3TyrlQbC57cAGDqP/qK7Iu3S0bflIg==" + "version": "0.3.55", + "resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.55.tgz", + "integrity": "sha512-Ijn4UEW6KX21ek/Hrl8z35J1mFhkTZ1YIiGxxPxQDxpD9vt3QC6Vw9QrEV7lzxeWx7QP0lRmQ1yni7NCgBAgYw==" }, "static-extend": { "version": "0.1.2", diff --git a/package.json b/package.json index d5956b68..71aafabd 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-navigation-header-buttons": "^2.1.1", "regenerator": "^0.13.3", "sn-models": "0.1.14", - "standard-file-js": "0.3.54" + "standard-file-js": "0.3.55" }, "devDependencies": { "babel-jest": "^23.6.0", diff --git a/src/screens/Authentication/Authenticate.js b/src/screens/Authentication/Authenticate.js index 421dfe4f..749bdf06 100644 --- a/src/screens/Authentication/Authenticate.js +++ b/src/screens/Authentication/Authenticate.js @@ -156,7 +156,7 @@ export default class Authenticate extends Abstract { async validateAuthentication(source) { // Don't double validate, otherwise the comparison of successfulSources.length will be misleading. let alreadySuccessful = this.successfulSourcesIncludesSource(source); - if(alreadySuccessful) { + if(alreadySuccessful || source.isAuthenticating()) { return; } diff --git a/src/screens/Authentication/Sources/AuthenticationSource.js b/src/screens/Authentication/Sources/AuthenticationSource.js index ce76fbba..bed42f5a 100644 --- a/src/screens/Authentication/Sources/AuthenticationSource.js +++ b/src/screens/Authentication/Sources/AuthenticationSource.js @@ -37,6 +37,10 @@ export default class AuthenticationSource { return this.status == "did-succeed"; } + isAuthenticating() { + return this.status == "processing"; + } + setAuthenticationValue(value) { this.authenticationValue = value; }