Resolving User Creation Issue and Database Index Discrepancies in Xano

In this meeting, the State Changers were trying to resolve an issue with user creation through the integration of OAuth services such as Google and Facebook. The problem arose when trying to add a new user record, which resulted in a duplicate record error.


The application interfaced with "Xano" and "Integromat" in handling these user records. The issue was found to be related to the unique indexing in the database set on the 'handle' field rather than the 'email' field. The email was supposed to serve as the unique ID, not the handle. After diving into the request that caused the issue, it became clear that there was insufficient information to resolve the problem. Hence, the team decided to create an event log where they could store data returned from one of the authentication services (referred to as Crypto One in the meeting) for better visibility. When they looked at the user table, they noticed duplicates in the 'handle' field, but a unique index was still established on it, which was unusual and possibly the source of the problem. The solution was to change this configuration and set the unique index on the 'email' field instead. After making these corrections, the user creation functionality worked as intended, indicating that the issue was likely due to a misconfiguration in the unique index. Additionally, the team agreed that checking these constraints in instances of similar issues would be a beneficial practice moving forward. Keywords: Xano, Integromat, User creation, OAuth, Unique Index, Database, Problem Solving.


(Source: Office Hours 8/18/2023 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free