Instagram身份验证已损坏? [英] Instagram Auth Broken?

查看:247
本文介绍了Instagram身份验证已损坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚注意到,依赖于Instagram作为主要登录名的我们的应用程序不再起作用.在进一步调查中,似乎Instagram的回调URL停止工作.现在,无论何时有人通过Instagram登录或通过Instagram注册,他们都会被带到Instagram应用程序,而不是被要求进行身份验证或进入我们的应用程序体验.

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.

我检查了另一个我是否知道的应用程序,称为"Print Studio",并且它们发生了相同的事情.

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

这个问题是否发生在其他任何人身上?关于导致它的原因的任何线索,有人从Instagram听到过可能的解决方法吗?

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?

推荐答案

是.似乎会影响所有应用程序(至少使用已批准的第三方API的应用程序).几天前我看到了这个问题,它自己得到解决.我认为Instagram工程师正在发布一些更新并破坏了某些内容.

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.

我建议从开发人员门户报告问题. https://www.instagram.com/developer/clients/manage/.收到的报告越多越好.

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

更新:

该问题似乎与Instagram端的cookie/会话持续更改有关. 要解决此问题,请在检测到用户到达Instagram主页时将用户重定向到原始身份验证URL.由于用户已经登录,因此应该将用户传递到正确的重定向URL,而无需再次登录.

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.

例如,迅速:

  // 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)
  }

这篇关于Instagram身份验证已损坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆