Questions tagged [omniauth-google-oauth2]
59 questions
0
votes
1 answer
Using MiniTest, when trying to test `omniauth-google-oauth2` gem I keep getting a 302 redirect to my sign_in path
I've setup omniauth-google-oauth2 gem with my rails application. And it works but while I try to write my test for it I keep getting a 302 redirect. Many of the website results I've seen reference how to test it in Rspec, but I'm trying to do it…

daveomcd
- 6,367
- 14
- 83
- 137
0
votes
0 answers
omniauth-google logout does not work
I am using omniauth-google-oauth2 to build login and logout. When i click login for first time, i get redirected to accounts.google.com and login. When I click logout and login again, it automatically logs me in without asking for account and…

makeapp
- 181
- 3
- 11
0
votes
0 answers
Rails Devise_token_auth invalid_credentials: OAuth2::Error
I'm building an api a restful based rails 5, devise_token_auth and Omniauth google Oauth2.
Currently basic account creation through email is working pretty well, Now I'm trying to configure Authentication with Google but during the authentication…

Alexis
- 139
- 1
- 2
- 9
0
votes
2 answers
Cannot get rails OmniAuth for Google work with devise
Im using "omniauth-google-oauth2" gem to setup google login alongside devise login. Also added an ssl in app root directory as mentioned in a tutorial (File => cacert.pem)
In /config/initializers/omniauth.rb
OmniAuth.config.logger =…
user8106529
0
votes
1 answer
Unwanted octothorpe character (#) added to request cycle
I'm using the omniauth-google-oauth2 gem to sign in users with Google.
After the oauth response is handled in controller, the user is redirected to another page: /dashboard. When landing on this page - a octothorpe (aka a hash/number/pound)…

Fellow Stranger
- 32,129
- 35
- 168
- 232
0
votes
0 answers
How can I test logged-in functionality in Rails 5 using Minitest and Omniauth?
I'm writing tests for a Rail 5 app and I'm struggling to test signed-in functionality. I'm using Minitest and Omniauth (specifically Google OAuth).
Most of my methods check for current_user and redirect to root_path if it's not present. I need to…

Steve
- 1
0
votes
1 answer
Is it possible to restrict google authentication to specific group of users?
I have recently used omniauth-google-oauth2 gem in one of my rails 5 application for authenticating users, and it is working fine. The application is intended for specific group of users, in my case students of a university. All users have a google…

Imran Ali
- 2,223
- 2
- 28
- 41
0
votes
1 answer
How to submit hidden form with omniauth in rails
I have integrated google and facebook omniauth in my rails application. The signup and signin works great. But, I also have a form which should be submitted along with omniauth, so that I can access the form content as parameters.
This is the piece…

Arpit Agarwal
- 517
- 1
- 5
- 17
0
votes
1 answer
devise omniauth google oath error : undefined method `stringify_keys' for "/users/auth/google_oauth2":String
While using devise with omniauth-google-oauth2 gem there is a link generated in partials for Sign in with Google. The default code does not render links.
Here's the autogenerated snippet (to which I added some bootstrap based style)
<%- if…

Anadi Misra
- 1,925
- 4
- 39
- 68
0
votes
1 answer
undefined method `provider' for nil:NilClass, RSpec, OmniAuth
I'm trying to test an authenticated controller with RSpec and OmniAuth. I've followed the integration testing guide on their wiki. When I run the test, I get the following error:
Failure/Error:
where(provider: auth.provider, uid:…

Carpetfizz
- 8,707
- 22
- 85
- 146
0
votes
1 answer
redirect_uri_mismatch. Login with Google using Ruby on Rails
I'm trying to add Google Login to my app using omniauth-google-oauth2 gem.
I have created the client Id and secret in console.developers.google.com and added redirect_uri as follows.
routes.rb
get 'auth/:provider/callback', to:…

rmn.nish
- 871
- 2
- 8
- 24
0
votes
1 answer
Authenticated routes with Omniauth Google
I'm trying to make an authenticated route /me using omniauth-google-oauth2. So far, I have the library set up to login and logout and it's working fine. However, I want to have certain routes be accessible only when a user is logged in. I found this…

Carpetfizz
- 8,707
- 22
- 85
- 146
0
votes
1 answer
Omniauth redirects back to signin page
So I'm trying to integrate Google OAuth2 with devise in my app but after signing in and allowing access to the app I get redirected back to the sign in page for some reason. I'm using the following…

user3151013
- 21
- 3
0
votes
0 answers
OAuth2::Error redirect_uri_mismatch using omniauth-google-oauth2 gem
I'm getting this error: OAuth2::Error redirect_uri_mismatch
This is how I have omniauth.rb set up, per omniauth-google-oauth2's documentation.
# config/initializers/omniauth.rb
OmniAuth.config.logger = Rails.logger
OmniAuth.config.full_host =…

ctrutmann
- 31
- 5