omniport-backend icon indicating copy to clipboard operation
omniport-backend copied to clipboard

Handle the case when Multiple user object returned while logging in

Open pradumangoyal opened this issue 5 years ago • 1 comments

This can be a point of discussion, should we return "Invalid credentials" or some more justified message.

Originally posted by @pradumangoyal in https://github.com/IMGIITRoorkee/omniport-backend/pull/127#r498024938

pradumangoyal avatar Oct 01 '20 07:10 pradumangoyal

The only condition in which multiple objects would be returned is if one's primary phone number is another's secondary number. So if we get multiple objects, we could filter out the one who's primary phone number matches the given username and return the user if it exists.

ShreyasTheOne avatar May 28 '21 05:05 ShreyasTheOne