supertokens-core
supertokens-core copied to clipboard
While creating user id mapping, cross app lock needs to be taken to ensure there are no duplicate external userid
🐛 Bug Report
If due to race conditions, 2 user id mappings with same external user id gets created across different user pools, if we query for user id mapping or user using external user id, results in an ambiguous situation as there will be multiple users for the result. As of now, we prioritise the user belonging to the tenant from which the query was made.