0

I am implementing Fit-bit rest-client authorisation in my android application. I use custom tabs for opening fitbit authorization URL like "https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=xxxx&scope=activity&redirect_uri=testing://callbackfitbit&prompt=login?time=time". What normally happens is I get Authorization code in my Activity class. But sometimes as fitbit URL is opened in custom tabs, my application is exited. I don't understand this behaviour.

No log is reported for this behaviour.

Any suggestion may help me understanding this behaviour.

abdul khan
  • 843
  • 2
  • 7
  • 24

1 Answers1

1

If you are integrating with an OAuth2 / OpenID Connect compliant authorization server, I would recommend AppAuth. AppAuth provides a simpler interface for performing OAuth2 authorization and token requests, and handles all the specifics of using custom tabs and routing of responses to your app. There is also an iOS variant of the library. Both are maintained by Google and the OpenID Foudnation.

Full disclosure: I'm the lead maintainer of AppAuth.

iainmcgin
  • 2,691
  • 1
  • 18
  • 24