auth-js icon indicating copy to clipboard operation
auth-js copied to clipboard

Always retry fetching

Open typed-sigterm opened this issue 8 months ago • 0 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] 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

typed-sigterm avatar Mar 16 '25 03:03 typed-sigterm