discord connection + auth
how can i let the user connect his discord account
and then on sign in page i want to have a sign in option with discord but only if the user connected his discord?
5 Replies
Can you precise more? I dont undestand at all what are you trying to achieve
with oauth theres no sign in or sign up, oauth handles the logins for you
you can use cookies if you want to show users what they used before
i found
that i have a function to link account
i managed to do this
but idk how i can check if the user has discord connected
in case he wants to disconnect his account
on server side you can use:
on client side you use
authClient
if hasDiscord is true then user has discord connectedSolution
This is for client in case you don't use Hono as your backend.
Havent tested it but should work fine
trying it rn
i guess this works