1

Hi I am trying to integrate devise and omniauth login on my app. I am trying with omniauth-google-oauth2 and I follow the instrunctions on this tutorial https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview

I do it all but I keep getting a google error message

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?

4
  • 1
    Check that you correctly set the APP_ID in devise.rb and restarted your server (config.omniauth :google_oauth2, "APP_ID", "APP_SECRET", { access_type: "offline", approval_prompt: "" } Commented Jan 4, 2013 at 8:34
  • Should i be putting the actual the client id and access id on devise.rb or where should I have them? Sorry I'm kinda new to Rails Commented Jan 4, 2013 at 15:47
  • 1
    Go to code.google.com/apis/console to create an app and get your APP_ID and APP_SECRET values, as explained in the "Google OAuth2 example" of the link in your question. You will also need to install this Gem github.com/zquestz/omniauth-google-oauth2 Watch these 2 railscast, you may find some help: railscasts.com/episodes/235-omniauth-part-1; Commented Jan 4, 2013 at 16:00
  • Thanks @Baldrick I got it now! Commented Jan 4, 2013 at 16:03

1 Answer 1

5

@Baldrick's answer helped me solve it.

Make sure that

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

is correctly set

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.