LinkedIn OAuth 2.0重定向URL [英] LinkedIn OAuth 2.0 Redirect URL

查看:153
本文介绍了LinkedIn OAuth 2.0重定向URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试使用LinkedIn Omniauth 2 gem登录用户.我为重定向尝试了几种不同的可能性,阅读了几篇文章,但没有任何效果.

I'm attempting to sign in users with the LinkedIn Omniauth 2 gem. I have tried a few different possibilities for the redirect, read several articles and nothing is working.

我正在尝试在本地进行测试. Rails 4应用程序

I'm trying to test this locally. Rails 4 app

宝石包括: 全方位认证 omn​​iauth-linkedin-oath2

Gems include: omniauth omniauth-linkedin-oath2

尝试将重定向URL放入框中,包括以下内容:

A few attempts of the redirect URL to put in the box includ:

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

  • =需要保持私有状态的API密钥

  • = API Key that needs to stay private

http://localhost:3000

http://localhost:3000/

http://www.localhost:3000

https://localhost:3000

https://localhost:3000/

https://www.localhost:3000

我从头到尾都阅读了这两篇文章,但是仍然无法尝试找到正确的方法来重定向它.

I read both of these articles the entire way through, but still couldn't attempt to find the correct way to redirect it.

https://developer.linkedin.com/forum/注册您的oauth-2-重定向网址

https://developer.linkedin. com/forum/oauth-20-redirect-url-faq-invalid-redirecturi-error

任何对我需要改变的帮助都是很好的.

Any help in what I need to change would be great.

推荐答案

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

They need to match exactly what you are sending:

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

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

这篇关于LinkedIn OAuth 2.0重定向URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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