i have an auth system using a third party library called supertokens, it maintains its own db of registered users with basic info, i also have a members table in my postgres which is supposed to be in addition to the supertokens database. i am using the email/password and third party login/signup flows overrides for which are provided by supertokens, give me all the correct permutations of auth flows signup/signin that can be made using this setup. make a table out of it that i can copy for markdown
Here’s a markdown-compatible table showing all the correct permutations of sign-up and sign-in flows using SuperTokens (email/password + third-party) with an additional members table in Postgres. This assumes you’re overriding the SuperTokens flows to manage your own table (e.g., syncing members
on sign-up if not present, or fetching on sign-in).
Flow Type | Method | Scenario | SuperTokens Action | Members Table Action |
---|---|---|---|---|
Sign-Up | Email/Password | New user | Create user | Insert new member |
Sign-Up | Third-Party (Google, GitHub, etc.) | New user | Create user | Insert new member |
Sign-In | Email/Password | Existing SuperTokens + Member | Authenticate user | Fetch member |
Sign-In | Email/Password | Existing SuperTokens only | Authenticate user | ❗️Insert member if missing (optional) |
Sign-In | Third-Party | Existing SuperTokens + Member | Authenticate user | Fetch member |
Sign-In | Third-Party | Existing SuperTokens only | Authenticate user | ❗️Insert member if missing (optional) |
Re-Sign-Up* | Email/Password | Existing user tries to sign up | Error: user already exists | No action |
Re-Sign-Up* | Third-Party | Existing user tries to sign up | Merged as sign-in automatically | Fetch/Insert member as needed |
Insert member
is where your override logic should sync with your members
table.members
table during sign-in if the entry is missing.Let me know if you want to distinguish guest sign-ins, multi-provider linking, or invite-only flows.