Skip to content

New token refresh algorithm on gotrue-js #317

Closed

Description

@dshukertjr

*Posting this without reading too much into the context, so might not be relevant for us, but wanted to get it out there for visibility.

Gotrue-js is updating their token refresh algorithm, here. Might be something worth looking into!
supabase/auth-js#564

Personally, I think the current implementation is okay though unless someone knows any issues.

Activity

  1. added
    enhancement
    auth
    on Dec 28, 2022
  2. matthewwong525 commented on Jan 4, 2023

    @matthewwong525

    So my supabase app supports offline usage (through flutter) and oftentimes if I get reports of my users being automatically "logged out". This is because the refresh token algorithm has trouble actually getting a refresh once the internet connection has been restored. Anyways, my solution to this was to periodically refresh the token (before it's expired) and set the expiration date to 7 days (maximum).

  3. d-e-h-i-o commented on Jan 19, 2023

    @d-e-h-i-o

    Our users also get logged out sometimes. Often the following exception is thrown:
    AuthException('Access token refresh retry limit exceeded.');
    GoTrueClient._setTokenRefreshTimer (gotrue_client.dart:552) GoTrueClient._callRefreshToken (gotrue_client.dart:606)

    Maybe this is expected when a short expiration time is set, and the internet connection not reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions