KyratKing
KyratKing
TTCTheo's Typesafe Cult
Created by habibi pluto ☻ on 11/12/2023 in #questions
seeking some advice on how to handle auth
I see, in that case, if you have all of the user's information, then for each form against a user, save the unique codes. Something like this: User A -> 6AVS21AC User B -> 9AS2OS1C User A -> 8VPWAM3 This way, when each of the form is submitted, you'd know which user has submitted their form. You can also forbid submitting a form more than once using a flag or something similar. And if you need, you can also fetch and populate needed user's data.
10 replies
TTCTheo's Typesafe Cult
Created by onestyle on 11/11/2023 in #questions
Share types between front and and backend without trpc...
Try using this website. If you paste a JSON object into it, it not only creates interfaces and enums for you, but it also gives you a set of functions to validate against that interface. This might be what you're looking for
3 replies
TTCTheo's Typesafe Cult
Created by habibi pluto ☻ on 11/12/2023 in #questions
seeking some advice on how to handle auth
How do you assume that the users will be able to verify/authenticate themselves with that link? I believe you need to have an OTP authentication system. The flow would be something like this. 1. You create a unique link 2. You send the link to the user 3. The user opens the link 4. The user has to enter their phone number or email to receive an OTP 5. If the user enters the OTP successfully, then you can authenticate that user and allow them to perform next set of steps. In database, I believe you'd need to save the unique link (a code) with the user's email/phone number since a email can be used against more than one unique links. You'd need to save the user's email or phone number in order to maybe contact them later or do an email campaign, etc.
10 replies