Devise skip confirmation when using omniauth
Try this with first_or_initialize
:
def self.from_omniauth(auth)
where(provider: auth.provider, uid: auth.uid). first_or_initialize do |user|
user.provider = auth.provider
user.uid = auth.uid
user.first_name = auth.info.first_name
user.last_name = auth.info.last_name
user.email = auth.info.email
user.skip_confirmation!
user.save!
end
end