Ignore email for unique key #1267
Unanswered
drumichael611
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All --
I have configured Shield to not use an email address, but a mobile phone number instead. The user enters their mobile phone, their password and then a 2fa code is sent to their mobile phone.
Users do provide their email address, but for authentication purposes, I don't really care about it. There could even be 2 accounts (2 different mobile phone numbers) that share the same email, and that's OK for our use.
Where I'm running into a problem is when registering, if the second user has an email that's already connected to another user, I get an error like this:
Duplicate entry 'email_password-****@gmail.com' for key 'auth_identities.type_secret'.
I guess what would solve this is to set the auth_identities as 'mobilephone_password-5555555555' instead. This would make the mobile phone unique instead. I just don't quite understand how to accomplish this.
Any guidance would be appreciated!!!
Beta Was this translation helpful? Give feedback.
All reactions