Prevent different identities from a same SSO provider from accessing a same account

glitch-soc/security/f96e71352244b1fb43fe1cdf6ec7608f7486d29d
Claire 2024-02-09 14:38:32 +01:00
parent e0ca3c200b
commit c459107df4
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ module User::Omniauthable
user = User.find_by(email: email) if email_is_verified
return user unless user.nil?
return user unless user.nil? && !Identity.exists?(provider: auth.provider, user_id: user.id)
user = User.new(user_params_from_auth(email, auth))