mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
improve registration and add oauth
This commit is contained in:
1 parent
f7ef99a624
commit
6f3fe1dd7b
20 files changed
+170
-23
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Users
|
||||
module_function
|
||||
|
||||
def from_omniauth(oauth)
|
||||
user = User.find_by(email: oauth.info.email)
|
||||
|
||||
return user if user
|
||||
|
||||
User.new(email: oauth.info.email,
|
||||
first_name: oauth.extra.id_info.given_name,
|
||||
last_name: oauth.extra.id_info.family_name)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user