Improve handling of empty uid params in omniauth auth responces [SCI-11312] (#8074)

This commit is contained in:
Alex Kriuchykhin 2024-11-27 10:12:58 +01:00 committed by GitHub
parent b770e5c499
commit e488e8108a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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=?',