mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
Improve handling of empty uid params in omniauth auth responces [SCI-11312] (#8074)
This commit is contained in:
parent
b770e5c499
commit
e488e8108a
1 changed files with 2 additions and 0 deletions
|
@ -386,6 +386,8 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def self.from_omniauth(auth)
|
||||
return nil unless auth.provider.present? && auth.uid.present?
|
||||
|
||||
includes(:user_identities)
|
||||
.where(
|
||||
'user_identities.provider=? AND user_identities.uid=?',
|
||||
|
|
Loading…
Reference in a new issue