Using OAuth.io iOS library to log into FitBit snag

295 views Asked by At

following OAuth.io simple two lines

OAuthIOModal *oauthioModal = [[OAuthIOModal alloc] initWithKey:PublicKey delegate:self];
[oauthioModal showWithProvider:@"fitbit"];

throws up the web view, with the proper FitBit page.

YAY

I fill in the email & password, tap "allow".

I then get the "green check" with the happy message "Authorized"..

--THEN-- the FitBit page says "please return to [The App] and enter the following PIN when requested".

problem 1) We're in [The App].. we never left it.. we're in a web view. there's no returning to the app

problem 2) Copying a PIN? that's really inconvenient.. especially on a mobile device. why can't it just be returned in a callback in the http param? Like Facebook SDK, like Twitter, like Instagram?

problem 3) because of 1), there is no button, no callback execution, the only thing that can be pressed is the X in the OAuth.io view controller

problem 4) the didFailWithOAuthIOError: delegate method gets called with 'user cancelled'.

it seems like something really simple is missing, but everything seems correct up until the "show with provider" call.

please help

1

There are 1 answers

0
Joe On

When you register your app on Fitbit you should select Application Type "Browser". This will authenticate without the use of a PIN.