In my case, I have a web client, a web server and a desktop app.
First the user creates a profile in the web client with email and password. At this point, once it's in the homepage, the user connects 3rd party services using OAuth2.0. The server handles the Authorization code flow and needs to store access_token
and refresh_token
somewhere.
So, the first problem is how do I store things in Supabase Postgres DB from the server?
Can I just access it using any library that connects to an SQL db following details here?
Assuming this is done, now the user will download the desktop app and login using the same username and password. Supabase on the client is happy and the user is authenticated. Now I need to request to my web server some resources.
Second problem is, how do I prove to the server that I am user X?
Edit: From here seems like I need to pass the JWT to the server and authenticate it using supabase library.