@supabase/auth-js 2.110.9-canary.0 → 2.110.9-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/auth-js",
3
- "version": "2.110.9-canary.0",
3
+ "version": "2.110.9-canary.2",
4
4
  "private": false,
5
5
  "description": "Official SDK for Supabase Auth",
6
6
  "keywords": [
@@ -4290,10 +4290,18 @@ export default class GoTrueClient {
4290
4290
  } catch (err) {
4291
4291
  await this.stateChangeEmitters.get(id)?.callback('INITIAL_SESSION', null)
4292
4292
  this._debug('INITIAL_SESSION', 'callback id', id, 'error', err)
4293
- if (isAuthSessionMissingError(err) || isAuthRetryableFetchError(err)) {
4294
- // A missing session or a transient/aborted network failure (e.g. a
4295
- // superseded page navigation cancelling the in-flight request) is
4296
- // not an application error — warn rather than surface it raw.
4293
+ if (
4294
+ isAuthSessionMissingError(err) ||
4295
+ isAuthRetryableFetchError(err) ||
4296
+ (isAuthApiError(err) &&
4297
+ (err.code === 'refresh_token_not_found' ||
4298
+ err.code === 'refresh_token_already_used' ||
4299
+ err.code === 'session_expired'))
4300
+ ) {
4301
+ // A missing session, a transient/aborted network failure (e.g. a
4302
+ // superseded page navigation cancelling the in-flight request), or
4303
+ // a dead refresh token (e.g. stale SSR cookies) is not an
4304
+ // application error — warn rather than surface it raw.
4297
4305
  console.warn(err)
4298
4306
  } else {
4299
4307
  console.error(err)
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.110.9-canary.0'
7
+ export const version = '2.110.9-canary.2'