Hey everyone, just wanting to find out as Im strug...
# support-questions-legacy
j
Hey everyone, just wanting to find out as Im struggling to seperate the two. Is SuperTokens only used for token management for users, or is it more similar to a self hosted Auth0 where SuperTokens also handles the creation, and management of users in a database?
r
hey @jordz2203 it's used for both - creation and sign in of users, as well as session token management.
j
Ah I see, thank you @rp_st . So am I correct in saying that SuperToken is very much like a self hosted Auth0 where we create an API to handle signups, sign in, session management, etc? Almost in a "decoupled" sense as the Auth system would be seperate to the rest of our services database which we work with directly?
Struggling to wrap my head around what SuperTokens does and has to offer coming from a more linear system where in a single SQL db we have a table for users, table for pages or posts, etc.
r
yes and no. Our architecture is slightly different compared to auth0. We make it easier to customise the auth logic to meet your business needs.
What type of login are you looking for?
j
Our client is wanting us to setup a SveltJS website for them as well as another service we have running already, but they want multiple different websites/platforms to all interact with the same user database. Similar to SSO but their own one I suppose. Which is why SuperTokens is attractive because one website is PHP based and another is Svelte based to the API is useful. Only thing Im struggling to workout is how "custom" we can store additional data in SuperTokens for our users, so if we need to store some credit they have, would we do it in their Super Tokens user or would we need another Database which we link with their UserID
Email/Password login ^
r
you could store in our db or in yours (linked to the user ID we generate). Have a look at this architecture page to get started with: https://supertokens.com/docs/emailpassword/introduction
j
Thank you, I will take a look :)
@rp_st is it possible when using Sign in to make sign in available on different domains? For example if I have mysignin.com as the sign in page or API, and mystore.com where the user needs to be "logged in" is it possible to do this? Basically I want a single API for login requests, but then the users are shared between 2 different websites
r
will the two websites both have a login page? Or do you want to redirect the user to a common login portal from thr client websites?
j
@rp_st either works, I feel like a commin login page would be nice but not required
r
Having a login screen per website is possible whilst sharing the same user pool across all websites.
Simply follow our guide for one website and the backend
And then for other websites, do the same thing as you did for the first website (without modifying the backend)
You will need to use header based auth instead of cookie based auth since the websites all have different domains.
But other than that, it’s a standard implementation. You can follow our recipe guides