Skip to content

New intent:// scheme breaks this check. Disable for now #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2017
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
New intent:// scheme breaks this check. Disable for now
  • Loading branch information
rogerhu committed May 12, 2017
commit 83f27e65667bac221cb98240d32e26d980686a9d
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