Giter VIP home page Giter VIP logo

omniauth-google's Issues

Dynamic providers error, client_id not found

Hi,
Currently I'm working with dynamic providers (https://github.com/intridea/omniauth/wiki/Dynamic-Providers), but i get a:

400 Bad Request

This is my omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
 provider :facebook, :setup => true
 provider :twitter,:setup => true
 provider :linkedin,:setup => true
 provider :foursquare, :setup => true 
 provider :google, :setup => true
end

This is my setup method:

def setup_google
 request.env['omniauth.strategy'].options[:client_id] = @site.google_client_id
 request.env['omniauth.strategy'].options[:client_secret] = @site.google_client_secret

 render :text => "Setup complete.", :status => 404
end

and I have the following route:

 match '/auth/google/setup' => 'session#setup_google'

I made it work with facebook, twitter, linkedin and foursquare. It not seems to be a routes problem, I done it right for all the others strategies, but with google keeps failing. Apparently never enters to the setup_google method.

What am I missing? any clue o this?

Thanks in advance.

The action 'google' could not be found for Users::OmniauthCallbacksController

Hi ,

i'm using omniauth-google for login with gmail. It is give me an error action "google" couldn't be found. while i have define it in "Users::OmniauthCallbacksController" like below.

     def google

     end

this code in my route file

devise_for :users, :controllers => {
:omniauth_callbacks => "users/omniauth_callbacks"

}

what is the problem i don't understand?

Please help

link sign in with google go here "localhost:3000/users/auth/google". Then i have grant access like this in screenshot.

Screenshot from 2013-04-14 10:10:01

But not working.

info missing

i want to know how to get the access token after routing the call back url

Use profile scope instead of contacts?

When omniauth-google was first written, I don't think the profile scope was available. Now Google has a couple userinfo scopes that may be better to use than the contacts scope:

userinfo.profile:

Gain read-only access to basic profile information, including a user identifier, name, profile photo, profile URL, country, language, timezone, and birthdate.

userinfo.email:

Gain read-only access to the user's email address.

See Google's description (including the full scope urls) at:
https://developers.google.com/accounts/docs/OAuth2Login#scopeparameter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.