Questions tagged [omniauth-google-oauth2]
59 questions
0
votes
0 answers
Why google authentication works well in development & staging modes but does not work in production?
I've got a problem with configuring google authentication in my ruby on rails application using devise and omniauth-google-oauth2.
After carefully following instructions from omniauth-google-oauth2 github readme I've added Authorized redirect URIs…

Kyryl Ωliinyk
- 146
- 13
0
votes
0 answers
ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity.) in Rails 7 while adding omniauth-google-oauth2
Following this video link - https://youtu.be/CnZnwV38cjo for adding the omniauth-google-oauth2 but after doing the exact things as suggested, still getting the
ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity.)…

Piyush Chaudhary
- 183
- 2
- 12
0
votes
0 answers
Google OAuth Redirect With Query String using gem "omniauth-google-oauth2" possible?
I am using omniauth-google-oauth2 gem, for google sign_in. I have read using state we can access the query parameter, check here
But how do I access it with 'omniauth-google-oauth2' gem
I want to get the value of 'test' after google sign_in is…

momwhocode
- 129
- 9
0
votes
1 answer
Rails Omniauth google_oauth2 for admin.directory.user.readonly scope
There is my settings in omniauth.rb:
provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'],
{
scope: 'https://www.googleapis.com/auth/admin.directory.user.readonly',
provider_ignores_state: true,
…

Kim K
- 39
- 5
0
votes
1 answer
How to keep the user logged in with launchWebAuthFlow?
In my Chrome extension, I'm using launchWebAuthFlow to authenticate the user via their Google account:
function launchGoogleAuthFlow(interactive) {
return new Promise((resolve, reject) => {
const manifest = chrome.runtime.getManifest();
…

Florian Walther
- 6,237
- 5
- 46
- 104
0
votes
1 answer
Can't setup simple OAuth2 between Google and toy website using Ruby on Rails, Devise, Omniauth
I am trying to learn Ruby on Rails by building a small web application. My first step was to start with OAuth login so users could login using Facebook, Google etc.
But when I go to the /users/sign_up devise page on my localhost and click on Sign in…

JoseCarlosVM
- 91
- 5
0
votes
1 answer
Could not authenticate you from GoogleOauth2, Devise. Rails 6
I trying to authenticate with Google and Devise Gem
at the final stage, I receive a flash message: Could not authenticate you from Google because user@gmail.com is not authorized. Therefore, I cannot log in
logs:
DEBUG -- omniauth: (google_oauth2)…
0
votes
1 answer
google omniauth rails with devise authentication failure
I want add omniauth with Google on my Rails app but i have error after redirection
ERROR -- omniauth: (google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, redirect_uri_mismatch: Bad Request
{
"error":…

Antoine Wako
- 145
- 1
- 17
0
votes
0 answers
google-oauth2 + devise :: service.list_user_labels user_id - error - Google::Apis::ClientError: Request had insufficient authentication scopes
Error - Google::Apis::ClientError: insufficientPermissions: Request had insufficient authentication scopes.
Facing error - at line result = service.list_user_labels user_id in dashboards_controller.rb
Following are my…

momwhocode
- 129
- 9
0
votes
0 answers
omniauth google suddenly failed when switching server
My code used to work. After I moved my server to a new one, suddenly I can't log in with google accounts anymore. I can see google presents me with a list of my accounts and google redirects to my server with all the params after I choose one…

TrongBang
- 923
- 1
- 12
- 23
0
votes
0 answers
Rails omniauth-google-oauth2 image size doesn't apply
I'm trying to apply image_size to omniauth-google-oauth2, but everything I tried didn't work.
My devise.rb
config.omniauth :google_oauth2, google_client_id, google_client_secret, {image_aspect_ratio: "square", image_size: 100}
I'm using my…

klasarn
- 129
- 1
- 12
0
votes
1 answer
Using Omniauth both for login with Devise as well as for accessing API's
In our application, we allow the user to access their data at different providers (Google Calendar, Microsoft Outlook, Facebook timeline, etc.) through the available API's, using Omniauth. For this we have an omniauth.rb with all the necessary…

Pascal Lindelauf
- 4,782
- 4
- 40
- 55
0
votes
0 answers
How to authenticate two types of user with same authentication callback in rails?
I want to create a webpage using rails 6.0.0, which has two types of users(model)
Admin
User/viewer
But the problems is that I want to authenticate (sign up /sign in) for both users with facebook or google_oauth2 with same callbacks…

Krishna Pandit
- 11
- 2
0
votes
1 answer
Google plus API shutdown today, which alternative can be used to authentication?
I am using rails-4, and have used OAuth-2 for authentication with Google+ API, for which the following gems are used, in my app:
omniauth-oauth2
omniauth-google-oauth2
I have received the following prior email notice:
On March 7, 2019, all…

ray
- 5,454
- 1
- 18
- 40
0
votes
1 answer
ActionController::RoutingError (uninitialized constant Users::OmniauthCallbacksController) Devise and google_oauth2
I have followed the tutorial from this link and keep ending up with the following log messages:
Started GET "/users/auth/google_oauth2" for 127.0.0.1 at 2019-02-22 20:59:25 +1100
I, [2019-02-22T20:59:25.512091 #11001] INFO -- omniauth:…

Darren
- 1,682
- 1
- 15
- 33