Search code examples
iosgigya

Invalid redirect_uri when attempting to use social sign in with Gigya with iOS


I'm attempting to integrate Gigya's social login into an iOS application. Within a ViewController, I'm triggering the showLoginUI method on the GSAPI class. This appears to work fine and invokes the web view containing links to each of the social providers. The problem that I'm facing is clicking on any of the providers, the delegate method gsLoginUIDidFail is returning the responseText

{"errorCode":400011,"errorMessage":"Invalid redirect_uri"}

I've been following the guide found at http://developers.gigya.com/035_Mobile_SDKs/010_iPhone

Initially, I thought that perhaps this was a problem with the gigya test providers, but adding a real provider app to the gigya configuration didn't resolve the problem.

The gigya api internally references a gsapi://login_result/ and wondered if perhaps this is the issue as I can't seem to work out where that protocol is being defined.

Also, running the test application linked in the guide encounters the same issue.

Hoping someone has encountered this problem themselves and knows what trick i'm missing to get things working?


Solution

  • Ok, so it turns out if you have already been using the API and have an API key, it's super easy to miss the step within "Gigya Setup - Obtain Your Gigya API Key" which requires you to tick a Enable Mobile or Desktop Client Applications API Access checkbox.

    Ensuring this is set resolves the issue.