2014-09-29 49 views
5

我试图用LinkedIn Omniauth 2 gem登录用户。我尝试了几种不同的重定向可能性,阅读了几篇文章,没有任何工作。LinkedIn OAuth 2.0重定向网址

我想在本地测试这个。 轨道4应用

宝石包括: 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

什么我需要改变将是巨大的任何帮助。

回答

5

他们需要匹配您要发送什么:

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

0

我有一个类似的问题,并保持收到“无效REDIRECT_URI。此值必须与API密钥注册的URL错误使用Auth0

当我在下面网址到允许回调的LinkedIn的名单,然后它的工作相匹配。”

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