Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to authenticate with SFSafariViewController?

I am trying to enable access from an iOS app I am writing that will access the FitBit API to log nutrition.  I am trying to use the SFSafariViewController to authenticate the user as per the recommended Authorization flow.  How do I inject the Authorization header into the SFSafariViewController as I keep getting the following error: 

 

{"errorType":"invalid_client","message":"Invalid authorization header format. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}

 

The URL I am trying to authenticate is below:

https://www.fitbit.com/oauth2/authorize?expires_in=604800&response_type=code&code_challenge_method=S...

 

I am using the AppAuth library located at https://github.com/openid/AppAuth-iOS to authenticate to the API.

 

Any help is appreciated.

 

Thanks!

Best Answer
0 Votes
0 REPLIES 0