Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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