开发者

Implementing MPOAuth in iPhone app

开发者 https://www.devze.com 2023-04-12 03:06 出处:网络
I have been all around the web trying to find resources on how to use MPOAuthMobile framework, to integrate OAuth to my iPhone app.

I have been all around the web trying to find resources on how to use MPOAuthMobile framework, to integrate OAuth to my iPhone app.

Th wiki here: http://code.google.com/p/mpoauthconnection/wiki/MPOAuthMobile says nothing about the configuration. I compiled the sample and added my endpoints to the oauthAutoConfig.plist and RootViewController. The requestToken goes fine and a unauthorized token is returned from my server.

The next thing is the framework opens the user access request to a page in Safari, not in a UIWebView as the wiki says.

Even after successfull login (via the web form) the v开发者_Python百科erification code is posted back to the browser.

The framework never requests the accessToken.

There is a lot of code (that looks like it can do everything automatically) but i cant figure out how to configure the framework.

My initial goal is to pop the UIWebView to the user with the login form and after tapieng "login" the framework/app should pick up the accessToken it self.

Can anybody help for make MPOAuthMobile work? Has anybosy had any success with the full flow?

Kind regards Esben


to make your app respond to the custom x-com-mpoauth-mobile://success make sure you have declared it in your Info.plist as follows:

Implementing MPOAuth in iPhone app

Then implement -(BOOL)application:handleOpenURL: in your App Delegate and Safari should pass control back to the app when it gets the access token.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号