
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
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
- Organization not exists anymore
Hello! We have a problem with a cloud database. We are on the Free plan, but after a refresh the site wants me to create a new organisation, and I not see the c...
