加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Oauth2 Instagram API“redirect URI与注册的

发布时间:2020-12-16 19:45:08 所属栏目:百科 来源:网络整理
导读:我正在开发一种正在开发模式的Rails应用程序,并且可以使用omniauth进行注册. 主持人是 http://localhost:3000/ 我正在使用宝石: gem 'omniauth'gem 'omniauth-foursquare'gem 'omniauth-instagram' 当我向Foursquare注册时,毫无疑问.所有的设置都是正确的,
我正在开发一种正在开发模式的Rails应用程序,并且可以使用omniauth进行注册.

主持人是

http://localhost:3000/

我正在使用宝石:

gem 'omniauth'
gem 'omniauth-foursquare'
gem 'omniauth-instagram'

当我向Foursquare注册时,毫无疑问.所有的设置都是正确的,而Foursquare开发者设置中的redirect_uri等于主机(localhost:3000)

但是,如果我在Instagram客户经理*中填写完全相同的redirect_uri(localhost:3000). Instagram给了我这个:

{
 "code": 400,"error_type": "OAuthException","error_message": "Redirect URI does not match registered             redirect URI"
}

基于此URL:

https://instagram.com/oauth/authorize?response_type=code&client_id=<ID>&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Finstagram%2Fcallback&state=18415adf24dd97873e61094f67c0fb7a94857fedf93e9d2e&scope=basic

*

根据Instagram,我做错什么,怎么解决?

解决方法

自己修复了问题添加localhost:3000 / auth / instagram / callback作为redirect_uri,它的工作很好.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读