Questions tagged [omniauth-google-oauth2]
59 questions
1
vote
0 answers
how Inject headers to OmniAuth mock tests
I'm using omniauth-google-oauth2 gem to log in via google account. recently I saw this post https://developers.googleblog.com/2020/08/guidance-for-our-effort-to-block-less-secure-browser-and-apps.html. even though it will not affect to the regular…

Oshan Wisumperuma
- 1,808
- 1
- 18
- 32
1
vote
1 answer
request.env['omniauth.oauth'] returns nil
I am using the omniauth-google-oauth2 gem to authorise google accounts, and getting the authorisation code, but getting the request.env['omniauth.auth'] as nil even after upgrading the gem to latest version.
ruby_version: 2.4.9
rails _version:…

Sushant Kumar
- 43
- 5
1
vote
1 answer
omniauth-google-oauth2 calendar sync giving invalid credential
I am using omniauth-google-oauth2 with branch: 'v0.2.10' for below mentioned scopes in code
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, APP_CONFIG['google_oauth2']['client_id'],…

Jeet
- 1,350
- 1
- 15
- 32
1
vote
1 answer
How to authenticate two types of user with same authentication callback in rails without devise gem?
I want to create a webpage using rails 6.0.0, which has two types of users(model) without devise gem.
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…

Krishna Pandit
- 11
- 2
1
vote
1 answer
Google OmniAuth for rails giving error "Missing required parameter: client_id"
I need some help.
I have followed all the steps correctly to enable a Google sign in using omniauth.
My Config/Initializers/omniauth.rb
require 'omniauth-google-oauth2'
require 'dotenv'
Rails.application.config.middleware.use…

b1044
- 55
- 5
1
vote
0 answers
ActionController::RoutingError with OmniAuth sign in
I have a devise + omniauth setup using omniauth-google-oauth2. When I attempt to sign in using it, it tries to GET /o/oauth2/auth and fails. I assume this is either a route provided by omniauth or it should actually be trying to GET [google…

Richard Quackenbush
- 11
- 1
1
vote
1 answer
Login google outh2 in rails
Whenever I tried to update first name and last name while logged-in through Google, It updates value. But when I re-logged in than It shows the old value (previous value were not saved).
Here is my code:
def self.create_user_for_google(data) …

shreejana
- 391
- 3
- 20
1
vote
1 answer
getting omniauth to mock login for request specs in rails
I wrote a test to assert certain requests can only be performed by logged in users, who will be logging in using Devise & Omniauth's Google OAuth2 system. I cannot find a way to mock omniauth into returning a logged in user, picked up the example…

Anadi Misra
- 1,925
- 4
- 39
- 68
1
vote
0 answers
Unable to mock Omniauth google
I am working in rails application and want to automate "Login with google" flow in my rails app.
here is my test case that i have written so far after googling. But instead of taking me to my home page it is redirecting me to some other URL. Don't…

Zia Qamar
- 1,694
- 1
- 15
- 35
1
vote
2 answers
Omniauth not working: undefined method `persisted?' for nil:NilClass
Error Message Picture
I basically followed the instructions from the below link EXACTLY and I'm getting this damn error? I have no idea what I'm supposed to do, wtf? Do I need to create some kind of persisted method?? There were several other…

ByteMe
- 1,159
- 2
- 15
- 28
1
vote
1 answer
OmniAuthGoogleOAuth2 in Rails 4 redirect to original request url after successful login
As per docs I implemented the authentication. Here is my application_controller.rb
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
…

Killerpixler
- 4,200
- 11
- 42
- 82
1
vote
0 answers
Rails with Devise, omniauth-google-oauth2 and omniauth-linkedin-oauth2 Authentication failed
I am using omniauth-oauth2,omniauth-google-oauth2,omniauth-linkedin-oauth2,omniauth-facebook,omniauth-twitter gems for Authentication of my basic rails app hosted in aws ec2.Facebook and Twitter Authentication is working fine but while…

current_user
- 1,172
- 1
- 16
- 28
1
vote
0 answers
Rails Omniauth Facebook login via API
I have a rails application fully operating. I am using Devise, Omniauth, Omniauth Google and Facebook to login vai Facebook and Google and is working fine.
I am building mobile application for this application. For authentication on mobile I am…

Santosh Aryal
- 1,276
- 1
- 18
- 41
1
vote
1 answer
How to config image size returned using omniauth-google-oauth2?
I try to config the omniauth-google-oauth2 with devise in my Rails app:
config.omniauth :google_oauth2, GOOGLE_APP_ID, GOOGLE_APP_SECRET, {
scope: 'email, profile, plus.login',
provider_ignores_state: true,
prompt: 'select_account',
…

Hieu Pham
- 6,577
- 2
- 30
- 50
0
votes
0 answers
Getting CSRF authentication tokens to work using omniauth-google-oauth2 and repost libraries in Rails app
Problem Outline
We have a Rails app that uses Google OAuth for login/authentication. We're trying to update omniauth to ~> 2 because that fixes security advisory CVE-2015-9284. We've followed the instructions for the upgrade on the omniauth github…

Nic
- 1
- 1