58 questions
0 votes
0 answers
43 views
How to use omniauth-google-oauth2 with a domain and subdomain in rails7?
omniauth-google-oauth2 works fine on the main domain, I have this folder structure: controllers/auth/google_oauth2_controller.rb inside google_oauth2_controller I'm using module Auth: module Auth ...
1 vote
0 answers
334 views
CSRF error with devise & Omniauth-google-oauth2 on rails API and react-oauth on React
I'm using Ruby on Rails 7 as API with omniauth-google-oauth2, omniauth-rails_csrf_protection, devise and devise-jwt. For React react-oauth and jotai. I configure my rails API like this: db/schema.rb .....
0 votes
0 answers
116 views
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 ...
1 vote
3 answers
599 views
How do you add a web App to your Google Cloud console?
I need to create a development Google OAuth 2.0 Client ID for my app. I see that you cannot have an origin of http in the list of allowed origins. The error states... Invalid Origin: This app has a ...
1 vote
0 answers
46 views
Force password submit on Google even when the user is already connected
I'm using https://github.com/zquestz/omniauth-google-oauth2 on a project. I want to force the password re-submission every time a user tries to login through a Google OAuth2 roundtrip. The problem is ...
3 votes
2 answers
720 views
Devise + Omniauth: disable email login when users enable SSO
I have a website that used a normal Devise login with email and password. Then I have completed this tutorial to add Omniauth / SSO: https://github.com/heartcombo/devise/wiki/OmniAuth:-Overview Now ...
0 votes
1 answer
287 views
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....
0 votes
1 answer
1k views
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) => { ...
1 vote
0 answers
509 views
Authentication failure! invalid_credentials: OAuth2::Error, invalid_grant: Bad Request, Ruby on Rails
I got stranger problem when deploy my ruby on rails app on docker When I run localhost all work perfectly, but when deploy on docker I got this error. I using few days for resolving this but ...
1 vote
1 answer
501 views
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 ...
3 votes
2 answers
1k views
How do i hookup a React button to authenticate with Devise Token Auth + OmniAuth
I'm having trouble connecting my Devise Token Auth with a token I get back from google in react. I'm using this package for the button: https://www.npmjs.com/package/react-google-login This is the ...
0 votes
1 answer
873 views
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 [email protected] is not authorized. Therefore, I cannot ...
1 vote
2 answers
994 views
I cant place my new middleware where I want to place it in the rack stack
I wrote a new middleware called RescueAuthTokenFromOmniauth, which rescues an exception created by either OmniAuth::Strategies::GoogleOauth2 or OmniAuth::Strategies::Facebook. Ideally, I want to place ...
2 votes
1 answer
901 views
Rails google-oauth2 404 - "Not found. Authentication passthru."
When attempting to sign in with Google Oauth, I encounter a 404 error "Not found. Authentication passthru." This worked just a month ago on my site, and I have not changed anything that ...
1 vote
1 answer
406 views
How to send sign in info to frontend after successful Oauth2 authorization in devise_token_auth?
I'm using devise_token_auth for Email and Google Oauth2 based authentication(used omniauth-google-oauth2 gem for this). I've successfully managed to store sign in info of the user signing up/in ...