How to redirect from Yahoo to my IOS app after authentication?

后端 未结 2 1331
时光说笑
时光说笑 2020-12-31 18:15

I am working on an app where I have to use Yahoo account to login. I had gone through this link and followed the procedure as it was there.But I am unable to get back to my

2条回答
  •  长情又很酷
    2020-12-31 18:38

    I have found the solution though with a little overheads. Steps are: 1> Create a PHP script in you own server (say named, YRedirect.php). 2> Paste the following code in it-

    CODE
    
    

    Where "com-mycompany-myapp" is your bundle identifier

    3> Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID. That's it and you are DONE with the authentication problem.

    In your code

    [self.session sendUserToAuthorizationWithCallbackUrl:@"http://yourdomain.com/YRedirect.php"];
    

    Then, register a custom URL scheme for your iPhone application from your Info.plist file, and then setup your server side script to redirect Safari back to your application via the URL scheme you just set up.

    Thanks for this valuable information. Following your instructions I got the auth & call back working and the php page loads the app.

提交回复
热议问题