Closed atmos closed 3 years ago
I have downgraded to version 1.9.1. It works.
gem 'omniauth', '1.9.1'
I had to add this to the initializer to get it working:
OmniAuth.config.allowed_request_methods = %i[get]
I had to add this to the initializer to get it working:
OmniAuth.config.allowed_request_methods = %i[get]
It also worked in the latest version. Thank you!
After reading the warnings in the log about the csrf attacks I have changed the allowed request method do post and installed the omniauth-rails_csrf_protection gem and then used the button_to method to link to /auth/:provider. Works fine and its closed to csrf attacks.
In the omniauth initializer:
OmniAuth.config.allowed_request_methods = %i[post]
Gemfile
gem "omniauth-rails_csrf_protection"
I'm always a huge fan of better security. Thanks for the great replies on this!
I recently upgraded to rails 6.1 and it no longer identifies the
/auth/google_oauth2
path. Any ideas?