mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:14:12 +08:00
DEV: Migrate Github authentication to ManagedAuthenticator (#11170)
This commit adds an additional find_user_by_email hook to ManagedAuthenticator so that GitHub login can continue to support secondary email addresses
The github_user_infos table will be dropped in a follow-up commit.
This is the last core authenticator to be migrated to ManagedAuthenticator 🎉
This commit is contained in:
@ -153,7 +153,7 @@ class BulkImport::DiscourseMerger < BulkImport::Base
|
||||
copy_model(c, skip_if_merged: true, is_a_user_model: true, skip_processing: true)
|
||||
end
|
||||
|
||||
[UserAssociatedAccount, GithubUserInfo, Oauth2UserInfo,
|
||||
[UserAssociatedAccount, Oauth2UserInfo,
|
||||
SingleSignOnRecord, EmailChangeRequest
|
||||
].each do |c|
|
||||
copy_model(c, skip_if_merged: true, is_a_user_model: true)
|
||||
@ -625,11 +625,6 @@ class BulkImport::DiscourseMerger < BulkImport::Base
|
||||
notification
|
||||
end
|
||||
|
||||
def process_github_user_info(r)
|
||||
return nil if GithubUserInfo.where(github_user_id: r['github_user_id']).exists?
|
||||
r
|
||||
end
|
||||
|
||||
def process_oauth2_user_info(r)
|
||||
return nil if Oauth2UserInfo.where(uid: r['uid'], provider: r['provider']).exists?
|
||||
r
|
||||
|
Reference in New Issue
Block a user