Instagram OAuth身份验证 - www.instagram.com重定向了你太多次了

Joh*_* Mc 5 oauth-2.0 instagram instagram-api

我正在尝试使用服务器端显式OAuth流程来允许用户通过Instagram进行身份验证,因此我的应用程序可以代表他们检索媒体.

我已经在Instagram上配置我的客户端,这是在沙箱模式,重定向到

https://localhost:44320/Admin/Instagram/OAuth
Run Code Online (Sandbox Code Playgroud)

我使用以下URL将用户重定向到Instagram:

https://api.instagram.com/oauth/authorize?client_id=CLIENT_ID_IS_HERE&redirect_uri=https%3A%2F%2Flocalhost%3A44320%2FAdmin%2FInstagram%2FOAuth%3FweddingId%3D2&response_type=code&scope=public_content
Run Code Online (Sandbox Code Playgroud)

我的问题是,如果用户已经过身份验证或在Instagram上成功进行身份验证,则重定向到我的回调网址不会到达我的终端,Chrome会抛出ERR_TOO_MANY_REDIRECTS错误.它也发生在Microsoft Edge浏览器上,但它只是挂起而不是出错.

通过检查Chrome上的网络活动,来自以下方面的来回反复:

https://www.instagram.com/oauth/authorize?client_id=...
Run Code Online (Sandbox Code Playgroud)

https://www.instagram.com/integrity/checkpoint/?next=/oauth/authorize
Run Code Online (Sandbox Code Playgroud)

然后再回来 我找不到有关开发人员文档的任何信息,以及来自经历同样事情的人的S/O. 因为我被困在这里,所以我会感激任何帮助或建议!