Hi All!
I'm trying to figure out the best way to "link" Accounts and my user collection. I know I can't link them with a relationship. I appreciate your thoughts on the "best" way to handle this!
When I create a new Account user would it be best to?
- grab the account user's id, and set the new user documents id === account user id
- grab the account user's id, let the user document generate a unique id, then toss the account users id into a property on the new user document. Such as "account id"
- Link the 2 with a 3rd collection. User Id generates its own unique id. The third document just has 2 properties:
- Account id
- User Id
The first option seems more efficient. And if I'm not misunderstanding something, someone would need the session data/secret not just the user id to really do anything to the Auth Account right? So 2 and 3 just seems to add extra complexity?
(I'm using Next.Js 15 if that changes anyone's answer)
Recommended threads
- Possible to query rows that have a certa...
I have a one way relationship relating `VolunteerReport` to `User`. I then want to list all `VolunteerReport`s related to `User`. I don't think I can just que...
- AstroJS Not Listed as a Web Framework Op...
Hey folks, as a followup to this post https://discord.com/channels/564160730845151244/1102936099745177700/1440603125642952734 I was trying to see if there was a...
- Database table mysteriously empty this m...
Hello, I'm testing out appwrite (free) with a simple vue app. This morning a I created a few indexes on a table, and then noticed that it was empty... I don't e...