Instagram API:在身份验证期间强制提​​示 [英] Instagram API: force prompt during authentication

查看:25
本文介绍了Instagram API:在身份验证期间强制提​​示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让 instagram auth(login) 总是要求认证?当用户登录并已授权应用程序时,将跳过此步骤.

Is there a way for the instagram auth(login) to always ask for authentication? This is skipped when the user is logged in and has already authorized the app.

它类似于 twitter 的 use_authorize=true 或谷歌的 approval_prompt=force.

It would be something like twitter's use_authorize=true or google's approval_prompt=force.

推荐答案

我认为最简单的方法就是使用next url:

I believe that the most simple way is to use next url:

https://instagram.com/accounts/logoutin/?force_classic_login=&next=URLENCODED_INSTAGRAM_OAUTH_URI_PATH_WITH_YOUR_DATA

例如:

window.location.assign('https://instagram.com/accounts/logoutin/?force_classic_login=&next=' + encodeURIComponent('/oauth/authorize/?response_type=code&scope=public_content+follower_list+comments&client_id='+ YOUR_IG_CLIENT_ID + '&redirect_uri='+encodeURIComponent(YOUR_REDIRECT_URI)));

请注意,您的重定向 uri 应编码两次

Please take a note that your redirect uri should be encoded twice

这篇关于Instagram API:在身份验证期间强制提​​示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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