简体   繁体   English

无法使用 devise 启用 google oauth2

[英]Unable to enable google oauth2 with devise

I'm trying to enable OAuth via google.我正在尝试通过谷歌启用 OAuth。 I've configured that callback URL but when trying to authenticate I get an error saying我已经配置了回调 URL 但是在尝试进行身份验证时出现错误消息

The redirect URI in the request, https://example.com/users/auth/google_oauth2/callback, does not match the ones authorized for the OAuth client

I set Authorized JavaScript origins to https://example.com and the redirect to https://example.com/users/auth/google_oauth2/callback . I set Authorized JavaScript origins to https://example.com and the redirect to https://example.com/users/auth/google_oauth2/callback .

I'm using devise 4.3.3我正在使用 devise 4.3.3

I would aim to trace HTTPS messages so that you can see exactly what is being sent over the wire - use a tool such as Fiddler or Charles.我的目标是跟踪 HTTPS 消息,以便您可以准确地看到通过网络发送的内容 - 使用 Fiddler 或 Charles 等工具。

Standard messages for a Web UI look like those from my write up . Web UI 的标准消息看起来像我写的那些。 Google messages will be equivalent.谷歌消息将是等效的。

Hopefully this approach will enable you to resolve your own problem.希望这种方法能让您解决自己的问题。 If not then please update your question with full HTTP message details如果没有,请使用完整的 HTTP 消息详细信息更新您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM