Hey guys, so I have an API that supabase authentic...
# help
b
Hey guys, so I have an API that supabase authenticated clients need to comunicate with. I want to be able to validate that the sender is an authenticated user server side, but I can't find any docs on that specifically. this is the closest I've found: auth.api.getUserByCookie() https://supabase.com/docs/reference/javascript/auth-user But i can't find anything on how it's implemented.
n
Hello @baj! 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.
🆕 server side auth check
g
If you have a jwt for the user you can use https://supabase.com/docs/reference/javascript/auth-api-getuser to check if user is valid on server.
n
server side auth check
b
ah okay. From my understanding, once the user has signed in succesfully, their JWT is available client side. I could then just send that along to the API
does that workflow sound right to you?
g
That should work. I'm not an expert on server side stuff though.
b
thanks! will check it out