app/models/user/omni_auth_extension.rb
def new_with_session(params, session)
      super.tap do |user|
        if data = session['devise.omniauth_data']
          user.email = data['user_info']['email'] if user.email.blank? && data['user_info']['email'].present?
          user.full_name = data['user_info']['name'] if user.full_name.blank? && data['user_info']['name'].present?
          user.skip_confirmation!

          user.identities.build(
              :provider => data['provider'],
                  :uid => data['uid'])
        end
      end
    end
# Used by devise for initializing new User, received both params and session.
# Builds aomniauth identity and fills user fields if omniauth data presents in the session
#
Used by devise for initializing new User, received both params and session.
Builds aomniauth identity and fills user fields if omniauth data presents in the session
Used by devise for initializing new User received both params and session . Builds aomniauth identity and fills user fields if omniauth data presents in the session
def new_with_session(params, session)
      super.tap do |user|
        if data = session['devise.omniauth_data']
          user.email = data['user_info']['email'] if user.email.blank? && data['user_info']['email'].present?
          user.full_name = data['user_info']['name'] if user.full_name.blank? && data['user_info']['name'].present?
          user.skip_confirmation!
          user.identities.build(
              :provider => data['provider'],
                  :uid => data['uid'])
        end
      end
    end
def new_with_session ( params , session ) super . tap do | user | if data = session [ 'devise.omniauth_data' ] user . email = data [ 'user_info' ] [ 'email' ] if user . email . blank? && data [ 'user_info' ] [ 'email' ] . present? user . full_name = data [ 'user_info' ] [ 'name' ] if user . full_name . blank? && data [ 'user_info' ] [ 'name' ] . present? user . skip_confirmation! user . identities . build ( :provider => data [ 'provider' ] , :uid => data [ 'uid' ] ) end end end
Used by devise for initializing new User, received both params and session.
Used by devise for initializing new User received both params and session .
params
session