【发布时间】:2020-05-16 16:45:41
【问题描述】:
我正在尝试通过 google 启用 OAuth。我已经配置了该回调 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
我将 Authorized JavaScript origins 设置为 https://example.com,并将重定向设置为 https://example.com/users/auth/google_oauth2/callback。
我正在使用设计 4.3.3
【问题讨论】:
-
重定向 uri 应该与 Google 中的设置完全匹配。通配符可能不起作用。您能否尝试在 Google 中设置完整的网址,即example.com/users/auth/google_oauth2/callback
-
@PrateekKumarDalbehera 这就是我已经拥有的
-
但错误清楚地表明重定向 uri 中存在不匹配。它以 example.com 开头??
标签: ruby-on-rails oauth-2.0 devise google-oauth