So, I have been working on the Google APIs for a long time, and now I am looking through this tutorial that I found on the Internet: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview and it almost worked for me. I followed all these steps and I was able to redirect to Google to request access for my application from the login page. However, when I click "Allow access", the server redirects me to a regular registration page, and I get a flash message:
Failed to authorize you with Google oauth2 because "Timeout"
Used gem:
gem 'omniauth-google-oauth2'
This is in my devise.rb model:
require "omniauth-google-oauth2" config.omniauth :google_oauth2, "myKey", "mySecret", { access_type: "offline", approval_prompt: "" }
And this is the route:
devise_for :gamers, :controllers => { :omniauth_callbacks => "gamers/omniauth_callbacks" }
source share