Help with persistent authentication #83
Replies: 2 comments 8 replies
-
Looking into it further the issue seems to be that despite all the provider code matching when the GetAuthenticationStateAsync() method from CustomAuthStateProvider class is called it hits await _client.InitializeAsync(); but this isn't causing the created loadSession() function in the CustomSupabaseSessionHandler class from being called. |
Beta Was this translation helpful? Give feedback.
-
Hey @wiverson, I tried like you did by adding to my Index.razor:
also tried calling from my MauiProgram.cs, but my app kind of "froze". I got a white page instead in both files. I was trying to do what @infraction mentioned but I'm not sure how to transform it in asynchronous because of the GetItemAsync.
The problem is... if I try to make it async:
I get: Does anybody have any idea what could I do? |
Beta Was this translation helpful? Give feedback.
-
Not sure where I am getting lost on this but I can't get auth to perist past the current session. I am following the "Blazor WASM Template using Supabase" as an example. My CustomAuthStateProviderand CustomSupabaseSessionHandler are identical to the example. When I load the page I can see the stored token in the browser local storage but unlike the live demo page if I leave and come back to the page the user is not logged in anymore.
Beta Was this translation helpful? Give feedback.
All reactions