class UserIdentity < ActiveRecord::Base
  belongs_to :user
  validates :provider, uniqueness: { scope: :user_id }
end

class UserIdentity < ActiveRecord::Base
  belongs_to :user
  validates :provider, uniqueness: { scope: :user_id }
  validates :uid, uniqueness: { scope: :provider }
end

Add validation for uid uniqness
Add validation for uid uniqness [GIOT-29]
