S
Supabase2mo ago
Catto

How to refresh access token using refresh token in supabase c# api?

j
11 Replies
Catto
CattoOP2mo ago
var session = await _supabase.Auth.SetSession(string.Empty, refreshToken, true);
var session = await _supabase.Auth.SetSession(string.Empty, refreshToken, true);
i have attempted this before however i dont actually keep /know the access token coz i dont really store it in cookie but instead some variable in frontend
Catto
CattoOP2mo ago
No description
Catto
CattoOP2mo ago
YOU DO HAVEEE ITTT lol for JS where is it in C# version? its MISSING GONE fine you may not have it in your C# supabsae library but atleast where is rest api? wheres yo rest api docs at
ibrahim
ibrahim2mo ago
I believe that the c# library is community managed and so i think you would have to look through that repo to see if there are any docs there https://github.com/supabase-community/supabase-csharp/wiki/Home/ebb9c7c3a3f9d25908e4609a03c1cd702044fd2a
GitHub
Home
A C# Client library for Supabase. Contribute to supabase-community/supabase-csharp development by creating an account on GitHub.
Catto
CattoOP2mo ago
damn seems like only function to refresh token requires access token and refresh token but i dont really persist the access token at front end, but i guess i have to
Catto
CattoOP2mo ago
oh thanks, so i simply need to call that auth/v1/token endpoint to get my new access token? or is it saying part of that auth supabase api i can do like supabase.token or something to get the new token yep that worked, thanks! :)
garyaustin
garyaustin2mo ago
Those are the endpoints the clients use. I don't use them directly so you are on your own.
Catto
CattoOP2mo ago
calling that api endpoint did the job, i wish they just ahd it part of the C# package in visual studio like if i can do supaabse.auth.login, why cant i refresh a token smh
garyaustin
garyaustin2mo ago
My guess is whoever started that client did not need that feature and did not implement it.

Did you find this page helpful?