auth-js icon indicating copy to clipboard operation
auth-js copied to clipboard

Allow set custom JWT on client

Open fernandops26 opened this issue 3 years ago • 0 comments

Hi, I am using supabase on a vscode extension.

First a little context: I am using the supabase-js client to call to the auth (github provider) and the response callback to my vscode extension (vscode://xxx.yyy...), here I am getting the access_token and the refresh_token from the URL #fragment, finally is storing on secrets storage and sending it to the react app mounted on my webview.

Well, I would like to have a way to set by default the JWT (access and refresh token) to be used directly from the react client, something like: supabaseClient.auth.setCustomJWT({refresh_token, access_token}) and to use it to do all needed calls.

Exist any workaround to do it?

I am not sure if I am using the correct flow, but that is the way that I am currently using it.

BWT: Would be nice to have an example of use of supabase with a vscode extension together.

fernandops26 avatar Sep 07 '22 04:09 fernandops26