Dont process authentication if already authenticating, still 3.0.5

This commit is contained in:
Mo Bitar
2019-04-03 12:05:14 -05:00
parent 674acb880f
commit ae1cb8dc28
4 changed files with 10 additions and 6 deletions

8
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -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;
}

View File

@@ -37,6 +37,10 @@ export default class AuthenticationSource {
return this.status == "did-succeed";
}
isAuthenticating() {
return this.status == "processing";
}
setAuthenticationValue(value) {
this.authenticationValue = value;
}