Allow same email address with different SSO providers
This commit is contained in:
parent
381ee35204
commit
63634f00df
3 changed files with 14 additions and 3 deletions
|
|
@ -0,0 +1,10 @@
|
|||
# A user's email address may not be unique if they use different
|
||||
# single-sign-on providers with the same email address.
|
||||
# But the combination of the email address and the (SSO)
|
||||
# provider should be unique.
|
||||
class ChangeUsersUniqueIndexToUidProvider < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
remove_index 'users', 'email'
|
||||
add_index 'users', ["email", "provider"], :unique => true
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue