Hey, As I understand, users are creating and signi...
# support-questions-legacy
w
Hey, As I understand, users are creating and signing in to superTokens's table, not to my table? So to change this, I need override like there is write : https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/handling-signinup-success ? I use Nestjs and Prisma.
Do some admin or someone else know?
@porcellus I mean is that I want email verification and user creation to my table, as I understand users are created in some SuperTokens table and not in my table, so according to the above tutorial I will have duplicated data in the db. Is there a way to achieve this without duplication?
p
hi
you could only achieve this by basically replacing and re-implementing the entire user handling code.
why do you want to store that data in your own table? or what do you mean by your own table?
you can change which DB supertokens connects to and you can change the table names as well
w
Do you mean I would have to give up SuperTokens? (first answer) I have a table relationship for users with other tables. I keep all the user data there (I have more fields than emailpassword_users). I have the whole CRUD prepared for this table. I don't know yet how to cache the data. I only found information about adding a prefix for table names and renaming the db schema.
p
Well, not all of it, but if you want to store users only in custom tables, then only the session handling would be useful to you I think.
Itd be easier to normalize your data and use the super tokens user id as a key
Basically supertokens would store the necessary data in it's own tables and you could store whatever else you need in your own tables
w
If only session recipe , it would use your email verification and I need to do social login myself?
So I need to create relation (your) emailpassword_users to my tables?
p
This is what I'd recommend.
The session recipe only handles session management, there is a separate recipe for email verification.
w
Where? I cannot find in session management recipe. And then I need create my own social login?
I see. And did I write well with which table from you I need to create a relationship with my one?
and out of curiosity, "Well, not all of it" so what would I need to replacing and re implementating?
p
here it is: https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/email-verification/about but it's not really intended to be used without an auth (emailpassword, thirdparty, etc) recipe. if you are only using the session recipe then it only handles session management. you'd need to implement everything else basically - sign in/up, user management, etc.
w
aa because I wasn't finding. I understood wrong. so it would be too much work, especially I already have a lof done.
I see. It'll be the most easy to do 🤔🙂
Could you write back on this question? It's just out of curiosity.
Maybe I'll understand better your service too 🙂
p
I think I've answered this above: we could handle session management and you'd have to implement basically everything else.
w
I meant this 🙂
p
that is the answer. you'd have to do everything besides session management.
I don't really get why you need to store data in that specific table. If you have any specific issues I'll try to answer them, most likely they can be solved without modifying the users table supertokens interacts with.
w
I meant theoretically. In this way I learn too.
I like catalogue so all about something, I like have in 1 place. Because it would be nice if in the future, you could add during configuration a selection for the user table with the required tables and relations 🙂
p
I'm not sure what you mean by theoretically.
As for using entirely custom tables to store our user data and making it configurable: I don't this is a strong enough use-case. It'd involve too much work and many non-obvious configuration options.
w
I mean this. I won't do, because I just want to know theoretically.
:)
And Thanks for your help :)
p
no problem. 🙂
5 Views