Open unc0ded opened 4 years ago
So do we let users register as both customer and vendor with the same phone number or just keep it restricted? I feel we should keep it restricted for now to keep it simple. We can allow both options later on.
Ideally, yes, they should be allowed. We can restrict that for now, but when we do that later, we would have change the structure of the vendors collection in the database because we can't really perform queries on it as it is right now.
About this, I have seemed to solve this issue in the backend. When you login with a phone number that has been used for both a vendor and customer account, the returned response contains two boolean fields "customer" and "vendor" that will be true or false according to which accounts the phone number is attached with. So the UI can maybe handle this with a popup that asks the end user whether he/she wants to log in as a Customer or Vendor.
So I think this issue can be closed, since it will be solved at the server side.
That sounds great👍
If a person has been registered both as a customer and vendor with the same credentials, while logging in, he/she is always redirected to customer section. Also, multiple accounts with the same phone/email have not yet been restricted.