Giter Site home page Giter Site logo

foursquare / foursquare-android-oauth Goto Github PK

View Code? Open in Web Editor NEW
134.0 134.0 34.0 491 KB

Foursquare native authentication makes it easier for your app's users to connect with Foursquare. Unlike web-based OAuth, native authentication re-uses the Foursquare app's user credentials, saving users the hassle of re-logging in to Foursquare within your app.

Java 84.42% Kotlin 15.58%

foursquare-android-oauth's People

Contributors

akdotcom avatar colriot avatar daisuke-nomura avatar kyleadrian avatar kylefowler avatar matthewmichihara avatar mwyszomierski avatar octopi avatar tetra2000 avatar willhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foursquare-android-oauth's Issues

Login fails with `FoursquareInternalErrorException: net::ERR_CLEARTEXT_NOT_PERMITTED` if Foursquare app is installed.

Environment:
Library version: com.foursquare:foursquare-android-oauth:1.1.0
Foursquare app version: 11.17.1
Android 10 Pixel 4XL

Prerequisites

Step by step

  1. App calls startActivityForResult with intent from FoursquareOAuth.getConnectIntent
  2. Foursquare app comes to foreground, then close immediately.
  3. onActivityResult called in the app side with the error below, fails to login.

Note that, if Foursquare app is uninstalled, webview comes and I was able to login by the app. Also, I was able to login with Foursquare app installed on Android 8.0 Xperia X Performance.

Android 10 Pixel 4 XL Android 8.0 Xperia X Performance
with Foursquare app Failed OK
without Foursquare app OK OK

So probably the issue exists on the Foursquare app side with newer version of Android OS, I bit suspect this is related to a clear text traffic feature introduced since Android 9.
https://developer.android.com/training/articles/security-config.html#CleartextTrafficPermitted

Possibly this PR aims to fix the same issue of mine, but preferably the issue should be fixed by the Foursquare app side so that user can skip login hassle, in my opinion.

Stacktrace sample:

com.foursquare.android.nativeoauth.FoursquareInternalErrorException: net::ERR_CLEARTEXT_NOT_PERMITTED
	at com.foursquare.android.nativeoauth.FoursquareOAuth.getAuthCodeFromResult(FoursquareOAuth.java:127)
	at <my app package name>.onActivityResult(SettingsActivity.java:426)
	at android.app.Activity.dispatchActivityResult(Activity.java:8162)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)
	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Downgrade API level

Why are you using API level 17 when you are not using any of its features?

I'm building an app which API level is 10 and this error appears when I'm trying to compile it using foursquare-android-oauth version 1.0.2:

Error:Execution failed for task ':prepareDebugDependencies'.
> ERROR: Debug has an indirect dependency on Android API level 15, but minSdkVersion for variant 'debug' is API level 10

I took the latest code from here and built a project with it targeting it to API level 7 and works fine. Why not use this API level instead?

share link on Foursquare ?

Hi, i am using this lib and demo, after login i want to share a link with some text , how can i share a link with some text , please anyone guides me?

Problem to sign release apk since android studio 3.0

Hi, since I updated my android studio to 3.0.1 I've experienced a weird error when signing an apk.
Below are the messages:

Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:Error: json defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:Error: opengl-api defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:Error: xmlParserAPIs defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:Error: xpp3 defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

I tried some solutions from internet such as declaring on submodule gradle
exclude module: 'httpclient' exclude module: 'commons-logging' exclude group: 'org.json', module: 'json' exclude group: 'org.apache.httpcomponents' exclude module: 'opengl-api' exclude module: 'xmlParserAPIs' exclude module: 'xpp3'

but no success =(
My gradle version is 3.0.1

sem titulo-2 fw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.