简体   繁体   English

devise + omniauth-google-oauth2调用错误

[英]devise + omniauth-google-oauth2 calling errors

Hi I am trying to integrate devise and omniauth login on my app. 嗨,我正在尝试在我的应用程序中集成devise和omniauth登录。 I am trying with omniauth-google-oauth2 and I follow the instrunctions on this tutorial https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview 我正在尝试使用omniauth-google-oauth2,并且遵循本教程的说明https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview

I do it all but I keep getting a google error message 我已完成所有操作,但始终收到Google错误消息

Error: invalid_request
Missing required parameter: client_id
Learn more
Request Details
response_type=code
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
redirect_uri=http://localhost:3000/users/auth/google_oauth2/callback
access_type=offline
approval_prompt=
state=50665ea3f96dc12e2189e93e1bc40592fc35ce5167d462e0
client_id=

Can anybody help me? 有谁能够帮助我?

@Baldrick's answer helped me solve it. @Baldrick的回答帮助我解决了这个问题。

Make sure that 确保

config.omniauth :google_oauth2, "APP_ID", "APP_SECRET", { access_type: "offline", approval_prompt: "" }

is correctly set 设置正确

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

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