首页 文章

LinkedIn OAuth 2.0重定向网址

提问于
浏览
7

我试图用LinkedIn Omniauth 2 gem登录用户 . 我尝试了一些不同的重定向可能性,阅读了几篇文章,没有任何工作 .

我想在本地测试一下 . Rails 4 app

宝石包括:omniauth omniauth-linkedin-oath2

重定向URL放入框中的几次尝试包括:

https://www.linkedin.com/uas/oauth2/authorization?client_id=759dczzx23nyic&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_basicprofile+r_emailaddress&state=8da572e31a8e66e6b1de54acddd14937d976ed06d7ed3217&client_id= *

  • =需要保密的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 回答

  • 0

    我遇到了类似的问题,并且不断收到“无效的redirect_uri . 此值必须与使用API密钥注册的URL匹配 . ”使用Auth0时出错

    我将以下网址添加到LinkedIn的允许回调列表中,然后才有效 .

    https://"Insert your Client Domain Name from Auth0"/login/callback
    
  • 6

    他们需要完全匹配您发送的内容:

    http://localhost:3000/auth/linkedin/callback

  • 1

    如果是Linkedin授权重定向URL,则应采用以下形式:

    验证后如果要重定向到特定页面

相关问题