Skip to content

Always retry fetching #1680

@typed-sigterm

Description

@typed-sigterm

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

It keeps trying to refresh the token when the server is unavailable. I can't get it to stop and show an error.

https://github.com/supabase/auth-js/blob/daa266949b336d2e78f2a7b9c9837b70abeab7a6/src/GoTrueClient.ts#L1836-L1859

To Reproduce

  1. Login to a working project
  2. Change supabase url to https://foo.example.com. simulate a server error

Expected behavior

Stop and throw an error after a certain number of attempts.

System information

  • OS: Windows
  • Browser (if applies): chrome
  • Version of supabase-js: 2.49.1
  • Version of Node.js: Bun 1.2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-jsRelated to the auth-js library.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions