Oauth does not suddenly work on iphone (only with FS application installed)

The iphone app allows you to login through Foursquare through oauth. It worked great and recently stopped working.

The error we get is: Connection failed: uri callback is invalid for this user.

HOWEVER, if the user does not have the foursquare application installed on the phone, it works fine, as before. It seems that FS is now doing a redirect to handle oauth inside the FS application, and this fails when trying to return to the original application. On safari it works.

This is on ios 9.

Solutions?? Thanks!

enter image description here

+7
redirect ios iphone oauth foursquare
source share
3 answers

We changed the use of the SafariViewController, and this seems to be causing Foursquare not to do this weird redirect in the application, solving the problem. This is also Apple's preferred oauth method, so this is probably the way to go.

Still seems like a problem on the Foursquare side that they might want to solve for others. I close this question. Thanks.

+2
source share

Where is your redirect url? If you want to launch the application after completion, you must specify the iTunes store link (pre-iOS9) for your application or universal link (hereinafter iOS9).

Additional redirection information for the foursquare embedded application is available in README here: https://github.com/foursquare/foursquare-ios-oauth/ p>

How to create a universal link in iOS9 https://www.appsflyer.com/blog/how-to-set-up-ios-9-universal-links-for-your-app/

+2
source share

The callback URL is a web page loaded after your web application has been verified. In this case, you need to specify a page for sending data in after authentication

Double check your Foursquare credentials and update the callback url to a valid link. Study Guide Link

Please follow the points below, maybe one solves your problem: -

  • Enter the callback in your foursquare account in the addcallback methods. Then in your code add a call to the provider before authorization. ( Link here ).

  • You get this error because the URL you are pointing your users to (foursquare.com/oauth2 / ...) includes the redirect_uri parameter, which does not match what you configured in your application settings in https: // foursquare.com/developers/apps . Make sure it matches!

0
source share

All Articles