add MS oauth

This commit is contained in:
Alex Turchyn
2023-11-21 00:35:03 +02:00
committed by Pete Matsyburka
parent 83ce401cf2
commit 9f48c6e625
8 changed files with 62 additions and 15 deletions
+4 -1
View File
@@ -58,7 +58,10 @@ class User < ApplicationRecord
has_many :email_messages, dependent: :destroy
devise :two_factor_authenticatable, :recoverable, :rememberable, :validatable, :trackable
devise :registerable, :omniauthable, omniauth_providers: [:google_oauth2] if Docuseal.multitenant?
if Docuseal.multitenant?
devise :registerable, :omniauthable, omniauth_providers: %i[google_oauth2 microsoft_office365 github]
end
attribute :role, :string, default: ADMIN_ROLE
attribute :uuid, :string, default: -> { SecureRandom.uuid }