In this post I’ll explain how to integrate google omniauth with Devise in Rails.
Step 1: Add Gems to Gemfile
Step 2: Add Column for Omniauth & UID
Step 3: Go to the User model and add the :omniauthable module
Step 4: Create a Project in google to get “Client key” and “Client Secret key”
https://console.developers.google.com/
Step 5: Modify the devise initializers and add this block around line 240
Step 6: Modify devise login block and routes.rb and add the folowing lines
Step 7: Create omniauth_callbacks_controller.rb controller
Step 8: Finally update user model and add the following block