diff --git a/app/models/user_identity.rb b/app/models/user_identity.rb index c5a7c08f6..e0ae551e4 100644 --- a/app/models/user_identity.rb +++ b/app/models/user_identity.rb @@ -1,4 +1,5 @@ class UserIdentity < ActiveRecord::Base belongs_to :user validates :provider, uniqueness: { scope: :user_id } + validates :uid, uniqueness: { scope: :provider } end