mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-03 02:14:29 +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
|
end
|
||||||
|
|
||||||
def self.from_omniauth(auth)
|
def self.from_omniauth(auth)
|
||||||
|
return nil unless auth.provider.present? && auth.uid.present?
|
||||||
|
|
||||||
includes(:user_identities)
|
includes(:user_identities)
|
||||||
.where(
|
.where(
|
||||||
'user_identities.provider=? AND user_identities.uid=?',
|
'user_identities.provider=? AND user_identities.uid=?',
|
||||||
|
|
Loading…
Add table
Reference in a new issue