add oauth with google

This commit is contained in:
João Geonizeli
2022-07-20 22:22:41 -03:00
parent 072e1de01b
commit ae7d31bc1b
9 changed files with 74 additions and 6 deletions

View File

@@ -18,10 +18,13 @@
# index_users_on_reset_password_token (reset_password_token) UNIQUE
#
class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
devise :database_authenticatable,
:registerable,
:recoverable,
:rememberable,
:validatable,
:omniauthable,
omniauth_providers: [:google_oauth2]
validates :name, presence: true
end