title: Rails Google OAuth2 + Devise - Could not authorize you from Google oauth2 because "Timeout"
body: <p>So I've been working on the Google API for a long while now going through this tutorial I found on the internet: <a href="https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview" rel="noreferrer">https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview</a> and it almost worked for me. I did all the steps specified and I successfully managed to redirect to Google to request access for my application from the sign in page. However, when I click "Allow access", the server redirects me to the ordinary sign up page and I get a flash saying: </p>
  
  <blockquote>
    <p>Could not authorize you from Google oauth2 because "Timeout"</p>
  </blockquote>
  
  <p>Gem used:</p>
  
  <pre><code>gem 'omniauth-google-oauth2'
  </code></pre>
  
  <p>This is in my devise.rb model:</p>
  
  <pre><code>require "omniauth-google-oauth2" 
  config.omniauth :google_oauth2, "myKey", "mySecret", { access_type: "offline", approval_prompt: "" }
  </code></pre>
  
  <p>And this is the route:</p>
  
  <pre><code>devise_for :gamers, :controllers =&gt; { :omniauth_callbacks =&gt; "gamers/omniauth_callbacks" }
  </code></pre>