Supabase auth #164
Replies: 1 comment 3 replies
-
Where are you persisting the session? There’s a callback interface to
implement persistence. If you are trying to persist on the client you might
want to look at the JS client instead. If you are trying to do this in the
server you might want to combine setting the JWT in a cookie with the
stateless C# APIs…
…--------------------------------------------------------
https://changenode.com/
***@***.***
On Fri, Jul 5, 2024 at 6:54 AM Gerardo Cruz ***@***.***> wrote:
I have a blazor wasm project, I am trying to authenticate a user, the sign
in works correctly, but it does not save the session, that is to say every
time I want to retrieve the user information I have to log in again.
If I log in and click on the button to see the session information it
returns the data correctly, but if I log in and close the project and run
it again it returns the session as null when it should have the session
saved, can someone help me with this?
This is the code I have
private async Task SignIn()
{
var user = await supabase.Auth.SignIn(email, password);
}
private void GetSession()
{
var user = supabase.Auth.CurrentSession;
string metadataJson = JsonConvert.SerializeObject(user, Formatting.Indented);
Console.WriteLine(metadataJson);
}
—
Reply to this email directly, view it on GitHub
<#164>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGVK6VJDRPZ5GNMVYGF2M3ZKYYJFAVCNFSM6AAAAABKMR23WSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWHA4TSNRXHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a blazor wasm project, I am trying to authenticate a user, the sign in works correctly, but it does not save the session, that is to say every time I want to retrieve the user information I have to log in again.
If I log in and click on the button to see the session information it returns the data correctly, but if I log in and close the project and run it again it returns the session as null when it should have the session saved, can someone help me with this?
This is the code I have
Beta Was this translation helpful? Give feedback.
All reactions