Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes failure when using API to test if already authorized #7

Closed
wants to merge 1 commit into from

2 participants

@jetpad

If you use .authenticate({interactive: false}) to check if the user has already authorized your app, the code fails for the case where they were not authorized because it is successful in checking the state of authorization but there isn't a dropstoreDatamanager that can be returned because the user has not authorized the account.

@jetpad jetpad Fixes failure when using API to test if already authorized
If you use .authenticate({interactive: false}) to check if the user has already authorized your app, the code fails for the case where they were not authorized because it is successful in checking the state of authorization but there isn't a dropstoreDatamanager that can be returned because the user has not authorized the account.
2b596f6
@AnalogJ
Owner

Yeah your right, it's something I should look into, but I'm not sure if completely removing the dropstoreDatastoreManager response is the answer.. it makes it easier to chain your methods together.

Instead it might make more sense to do a smarter check and reject the promise if they arn't logged in. If you want to modify your pull request that would be appreciated, or I can take a look at it this weekend.

@jetpad

Yea my fix is kind-of crude but I don't really know your code very well at this point to make a better fix. As I work with dropstore-ng more, I'll give it some thought on how to fix it the right way.

@AnalogJ AnalogJ closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2014
  1. @jetpad

    Fixes failure when using API to test if already authorized

    jetpad authored
    If you use .authenticate({interactive: false}) to check if the user has already authorized your app, the code fails for the case where they were not authorized because it is successful in checking the state of authorization but there isn't a dropstoreDatamanager that can be returned because the user has not authorized the account.
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 1 deletion.
  1. +0 −1  components/dropstore-ng/dropstore-ng.js
View
1  components/dropstore-ng/dropstore-ng.js
@@ -54,7 +54,6 @@ angular.module("dropstore-ng", []).
deferred.reject(err)
} else {
logger.log('dropstore "'+cmdName+'" returned successfully', res);
- deferred.resolve(dropstoreDatastoreManager(res))
}
});
}
Something went wrong with that request. Please try again.