0

I'm creating an Android App using Java in Android Studio that will need to use OAuth2 to communicate with a 3rd-Party provider (Furkot, mobile method) to gain authorization for subsequent API calls.

Using Open Id's AppAuth demo application (https://github.com/openid/AppAuth-Android) the demo app successfully:

  • Sends the authentication REQUEST for a TOKEN from the Furkot Server
  • Prompts user to login to Furkot
  • Prompts user to allow read-only access to Furkot data
  • [Furkot successfully sets the application as an allowed application]
  • Receives the RESPONSE with the TOKEN value at the redirect_uri in a parameterized URL
  • Shows the full responseUri value in the RedirectUriReceiverActivity during debug.

Somewhere between the

RedirectUriReceiverActivity

and the

TokenActivity.onStart() AuthorizationResponse response = AuthorizationResponse.fromIntent(getIntent());

the code decides that the response is NULL so errors.

And I can't figure out where it's doing that to be able to troubleshoot further. Debugging and stepping into this section gets me nothing of value to my brain.

~~~~~~~ Caveat: while I have 13+ years experience developing C# .NET applications, this is my first Android app and first time working in Java. So I'm swimming a bit out of my comfort zone. ~~~~~~~

If anyone has experience -- very specifically with the Open Id AppAuth demo application -- and can assist, it would be greatly appreciated!

Becca
  • 23
  • 9
  • Lead maintainer of AppAuth here - I'm not familiar with Furkot but I suspect from that they may not be handling the auto-generated _state_ parameter correctly (since they make no mention of it in their documentation). If you could post a full example of the authorization request URI that AppAuth is sending, and the full URI of the redirect response, I can help. Also, check your logs to see if the library is logging why it is rejecting the response. – iainmcgin Jul 07 '17 at 09:58
  • I have a similar problem using Azure b2c authentication. While debugging I can see the response in the uristring and ssp data fields but they're not detected as part of the extra response. – MechEngineer Sep 18 '17 at 15:41
  • OK, so apologies for no response to your responses here! We went on a 3-week motorcycle vacation to Alaska shortly after this -- for which I was making this app -- and by the time we got back, I'd entirely forgotten about having submitted this question. {doh!} Leaving it here though as I'll probably want to revisit it if/when I pick up that app development again. :0) – Becca Jun 17 '20 at 13:18

0 Answers0