Configuration Settings for Omniauth for Google in Rails

I am using Omniauth 1.0.1 in a Rails application for authentication. I have " omniauth-google-oauth2 " for the Google provider. But it shows me a mistake like

`rescue in provider ': could not find a suitable strategy for: google. You may need to install an additional stone (e.g. omniauth-google). (LoadError).

I gave the " provider: google, 'domain.com', 'secret' ,: scope => 'https://mail.google.com/mail/feed/atom/' in my initializers. Could you tell me what went wrong? Thanks.

+6
source share
2 answers

Try using

:google_oauth2 

as a supplier.

+5
source

Starting with version 1.0, omniauth has deduced individual strategies for individual gems. For more information, visit omniauth and / or listen to, for example, this excellent railscast .

+1
source

Source: https://habr.com/ru/post/903364/


All Articles