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
paulmest
10/10/2023, 12:32 AM
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
kaltemrix
10/10/2023, 12:34 AM
A different schema makes a lot of sense. This is likely the route I will go down also
p
paulmest
10/10/2023, 12:51 AM
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.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).