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

查看:38
本文介绍了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?

推荐答案

是的.似乎影响所有应用程序(至少是使用批准的第 3 方 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.

例如,在 swift 中:

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

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

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