Skip to content

Commit

Permalink
Merge pull request #39 from rogerhu/fix_intent
Browse files Browse the repository at this point in the history
New intent:// scheme breaks this check.  Disable for now
  • Loading branch information
rogerhu authored May 12, 2017
2 parents 44e0199 + 83f27e6 commit 593c27d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Next, add this line to your `app/build.gradle` file:

```gradle
dependencies {
compile 'com.codepath.libraries:android-oauth-handler:1.2.3'
compile 'com.codepath.libraries:android-oauth-handler:1.2.4'
}
```

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {

GROUP = 'com.codepath.libraries'
BASE_VERSION = "1.2"
VERSION_NAME = "1.2.3"
VERSION_NAME = "1.2.4"
POM_PACKAGING = "aar"
POM_DESCRIPTION = "CodePath OAuth Handler"

Expand Down
8 changes: 3 additions & 5 deletions app/src/main/java/com/codepath/oauth/OAuthBaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ public void connect() {
public void authorize(Uri uri, OAuthAccessHandler handler) {
this.accessHandler = handler;
if (checkAccessToken() == null && uri != null) {
String uriServiceCallback = uri.getScheme() + "://" + uri.getHost();
// check if the authorize callback matches this service before trying to get an access token
if (uriServiceCallback.equals(callbackUrl)) {
client.fetchAccessToken(getOAuth1RequestToken(), uri);
}
// TODO: check UriServiceCallback with intent:// scheme
client.fetchAccessToken(getOAuth1RequestToken(), uri);

} else if (checkAccessToken() != null) { // already have access token
this.accessHandler.onLoginSuccess();
}
Expand Down

0 comments on commit 593c27d

Please sign in to comment.