tursodatabase / turso-docs

Turso Documentation
https://docs.turso.tech
MIT License
11 stars 49 forks source link

Question about Multi-tenant architecutre #188

Closed sadnansami closed 5 months ago

sadnansami commented 5 months ago

Path: /api-reference/databases/create-token

I'm basically creating databases dynamically for each new project/user and this means I need to either store the credentials in a seperate database or generate an auth token every time a request is made to my website. I think it makes more sense in terms of security to generate an auth token every time, but what if it's like 10000 requests per day? Thank you to whomever is trying to help me in advance 💖.

notrab commented 5 months ago

Hey @sadnansami

I would recommend using a group token. Since tokens are used by you on your server on behalf of the user, you should be safe to use the same token for all users.

If you're building a system whereby you provide tokens to the end user for them to connect, you'll need to create individual tokens.

I hope that helps 😄