10

We just noticed that our app which relies on Instagram as the primary login is no longer working. In investigating this further, it appears the callback URL for Instagram stopped working. Now whenever anyone logs in via Instagram or signs up via Instagram, they are taken to the Instagram app instead of being asked to authenticate or taken into our app experience.

I checked another app that I know if, called "Print Studio" and the same thing is happening to them.

Is this issue happening to anyone else? Any clue as to what is causing it and has anyone heard from Instagram on a possible fix?

2

1 Answer 1

5

Yes. seems to effect all applications (at least the apps that are using the approved 3rd party API). I saw this issue few days ago and it got resolved by itself. I assume Instagram engineers are rolling some updates and broke something.

I suggest reporting an issue from the developer portal. https://www.instagram.com/developer/clients/manage/. as many reports as they receive, the better.

UPDATE:

The issue seems to be related to cookies / session persistent changes made on Instagram side. To workaround the issue, redirect the user to the original auth url when you detect the user got to the Instagram homepage. Because the user is already logged in, this should pass the user to the correct redirect url without logging in again.

for example, in swift:

  // MARK: - WKNavigationDelegate
  override func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {

   if let urlString = navigationAction.request.url?.absoluteString {

     if urlString == "https://instagram.com" || urlString == "https://instagram.com/" ||
      urlString == "https://www.instagram.com" || urlString == "https://www.instagram.com/" ||
      urlString == "http://instagram.com" || urlString == "http://instagram.com/" ||
      urlString == "http://www.instagram.com" || urlString == "http://www.instagram.com/" {

        decisionHandler(.cancel)
        self.refresh(nil) // reloads the original auth url
        return
      }
    }

    super.webView(webView, decidePolicyFor: navigationAction, decisionHandler: decisionHandler)
  }
19
  • Yep, I reported earlier today. Still not fixed, but I'm hopeful it will be tomorrow. When you said it got resolved by itself, that is to say you are currently using OAuth and the callback URLis working as expected? So weird.
    – Paul Aaron
    Oct 25, 2016 at 4:49
  • 1
    Yes. the callback URLs started to work normally after the last issue last happened few days ago. I posted a workaround above if you're interested
    – aporat
    Oct 25, 2016 at 5:37
  • You are a sweet prince, aporat
    – John
    Oct 25, 2016 at 7:29
  • @aporat I am also facing the same problem. Are there any side-effects of this redirect, if Instagram fixes things? I wonder if I should do an update of the app or not...
    – Alin
    Oct 25, 2016 at 11:51
  • @Alin I would wait if were you, the same problem here but I am not sure if an workaround is the best approach Oct 25, 2016 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.