Am I doing it all wrong?
I am building something that needs a server since it handles exchange of access and refresh tokens with Google and Microsoft. I decided to use Supabase for handling user signup / login to have one less thing to think about. But now I am faced with the following problems that makes me question whether I am using Supabase correctly and whether it fits my needs.
The scenario I am facing is the following:
A few questions:
The scenario I am facing is the following:
A few questions:
- How does the client makes an authenticated request to the server?From [this](https://github.com/supabase/supabase/discussions/1094) thread, my understanding is that I need to send a JWT to the server, and then the server needs to create a new Client (via `supabase-js` for example) and that will tell me which user is making the request.
- Once I know the user that is making the request, I want to retrieve her tokens from the database. From my googling, it doesn't look like I can modify the table where the user information is stored `auth.users`, so what is the best way to go about this? Should I create a new table that contains the `id` of the user and the relative tokens? Do I do this from the web console of Supabase?
GitHub
For context, I'm using Next.js with supabase-js, roughly following the Next.js with supabase auth example. I have a policy uid() = user_id on a table with row level security turned on, and ...