Maptio / maptio

http://www.maptio.com
Other
24 stars 5 forks source link

Fix not recording users as already in Auth0 on signup #696

Closed rgoj closed 2 years ago

rgoj commented 2 years ago

On signup, we weren't setting the isInAuth0 property to true!

We found this out just now when someone (presumably) created a new account after receiving an invitation (i.e. the new account wasn't the account that was invited) and that account wasn't marked as isInAuth0. At this point we had two objects for this person in the DB, one actually connected to Auth0 but only with an example team. The other connected to the inviting org but not to Auth0. And then, because isInAuth0 was set incorrectly, deduplication on invite didn't work correctly either, making it impossible to invite the user. Convoluted!

In any case, just setting isInAuth0 correctly allowed me to fix that problem via deduplication. Now we need to make sure that isInAuth0 is properly set for all users who sign up directly to Maptio (i.e. without receiving an invite).