https://supabase.com/ logo
Hello. I am using Supabase for my users, and manag...
# help
l
Hello. I am using Supabase for my users, and manage links there too. So a user has also a "discord_id" field. Is there a way to use the integrated auth providers but save it to my DB?
n
Hello @lennard.! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
l
@User
j
@lennard. support is automatically tagged when the thread is created. Please don't ping them again
You need to provide more context for your question; oftentimes if a question remains unanswered this is the reason
l
@jaitaiwan Oh I apologize for my misbehavior.
So my detailed problem is that i love the supabase auth.
But it looks like they get stored in a other tab under „users“. Tho I have a users DB and would like to store them there if possible.
In my „users“ table I store the users linked accounts already so I’d like to still use auth, but not the users section
j
Go to your table editor
Select the "auth" schema
l
Ohh cool, so I can use that too?
And give each user an id, that I then link to the table which stores their connections? @jaitaiwan
j
It's not really clear to me what you're trying to achieve
There's already discord login with supabase auth?
l
So im using prisons to save for example their crypt address
Or for example disxord. Which I did using Discords API before.
But now I’d like to I use Supabase auth, but Store the users in my „users“ table of my public scheme
Where I also stored my users crypto addresses etc. @jaitaiwan
Not with supabase. Only with discord directly.
Id like to use supabase
*Prisma. Not prison
j
@lennard. is english your first language? If not I can probably use google translate and understand what you're trying to achieve a bit better. Is that ok?
l
Yes it is not. Sorry.
Basically I have a table called „users“. I have moved this from my previous provider. On the table I store things like the username, crypto addresses or discord profile url.
j
Right! Ok this is starting to make more sense
l
But, to have a clearer integration, I would like to use Supabase to store my users. But my Problem here is that I also have custom field like the user_type (if a user is verified).
Is there such a way?
I am using prisma.io as ORM if this helps.
@jaitaiwan To me it looked like the users aren’t stored in a table, but under „Authentication“
j
They are stored in a table 🙂
l
Okay perfect. So i can implement the auth and still have custom other fields?
j
You'll likely want to store the data in one of two ways. Either in a table in your public schema with a foreign key which links to the auth.users.id field
Or use the raw_app_user_metadata field in the auth.users table to store all your custom info
l
Okay. Thank you for the good support! @jaitaiwan
j
My pleasure. Good luck on your adventure!
l
Thanks!
@jaitaiwan I am trying this out now, but is there any way to "link" a provider?
So multiple providers per account
j
@lennard. in supabase land I think that's called "identities"
There's one user with multiple identities
So discord, google etc etc
l
Thank you. Where can I find the docs for it?
Im kind of thinking about it a a) Should use Supabase auth or b) implement a normal user password auth. and then just link Twitter, discord and more by their oauth
@jaitaiwan I think I’ll just create a new table in the auth. sector with a link
j
Auth schema can't be accessed in supabase-js fyi
l
And with prisma?
Im not sure if I should use Supabase auth then
j
Accessible with prisma 🙂
l
Oh okay. Is there a doc about it?
@jaitaiwan Tho I only want to link discord and Twitter to them. And some more stuff.
So I assume a foreign key is better? I tried to use one but prisma won’t support cross Table foreigners
j
Ah ok I'm not sure sorry
2 Views