Hi there. First time implemention auth, and have a...
# general
k
Hi there. First time implemention auth, and have a probably simple question. Is it best practice to have SuperTokens run on its own database and have cross database relationships between SuperTokens Users and my other databases Customers and Users tables?
p
I'm also curious about this. We use Postgres and have decided to use put
supertokens
in its own schema in the same database for now. And we have a
users
table in our
public
schema that relates to the supertokens record.
k
A different schema makes a lot of sense. This is likely the route I will go down also
p
Supertokens exposes an environment variable for this:
POSTGRESQL_TABLE_SCHEMA
... and we just set that to
supertokens
and upon container boot, it will check for that and create all of the tables within that schema.
r
Thanks @paulmest. This is a good solution indeed.