Skip to content

Autorefresh betweeen sessions not working #108

@zalito12

Description

@zalito12

Bug report

Describe the bug

I'm using email+password Auth but I cannot make Autorefresh work.

I don't know if it's a lack of documentation, a problem on my code or I've missed something. But everytime I run my app and 1 hour has passed, the stored session is destroyed and I have to login again.

I haven't tested autorefresh in same session yet, I have to change token expiry time and check it.

Expected behavior

I thought that autorefresh will refresh the token between sessions, so I didn't have to enter my credentials everytime I run the app.

Screenshots

I've implemented a Session Handler similar to the one found in docs: https://github.com/supabase-community/supabase-csharp/wiki/Authorization-with-Gotrue#session-persistence

You can see my implementation here: https://github.com/GonGarce/AvaloniaTodoApp/blob/supabase/AvaloniaTodoApp/Client/SessionHandler.cs

You can see client creation on this file: https://github.com/GonGarce/AvaloniaTodoApp/blob/supabase/AvaloniaTodoApp/Client/SupabaseService.cs

As you can see I set AutoRefreshToken = true and set session handler.

The console information shows up as follows

!--------------LOAD SESSION--------------!
!--------------DESTROY SESSION--------------!
!--------------SAVED SESSION--------------!
[Supabase AUTH]: Loaded session has expired
!--------------DESTROY SESSION--------------!

System information

Creating a desktop app with avalonia.

  • OS: Windows
  • Version of supabase gotrue: 6.0.3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions