我试图用LinkedIn Omniauth 2 gem登录用户 . 我尝试了一些不同的重定向可能性,阅读了几篇文章,没有任何工作 .
我想在本地测试一下 . Rails 4 app
宝石包括:omniauth omniauth-linkedin-oath2
重定向URL放入框中的几次尝试包括:
- =需要保密的API密钥
http://localhost:3000
http://localhost:3000/
http://www.localhost:3000
https://localhost:3000
https://localhost:3000/
https://www.localhost:3000
我在整个过程中阅读了这两篇文章,但仍无法尝试找到重定向的正确方法 .
https://developer.linkedin.com/forum/register-your-oauth-2-redirect-urls
https://developer.linkedin.com/forum/oauth-20-redirect-url-faq-invalid-redirecturi-error
我需要改变的任何帮助都会很棒 .
3 回答
我遇到了类似的问题,并且不断收到“无效的redirect_uri . 此值必须与使用API密钥注册的URL匹配 . ”使用Auth0时出错
我将以下网址添加到LinkedIn的允许回调列表中,然后才有效 .
他们需要完全匹配您发送的内容:
http://localhost:3000/auth/linkedin/callback
如果是Linkedin授权重定向URL,则应采用以下形式:
验证后如果要重定向到特定页面