@supabase/auth-js 2.110.7 → 2.110.8-canary.1
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/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +14 -2
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/fetch.d.ts.map +1 -1
- package/dist/main/lib/fetch.js +4 -2
- package/dist/main/lib/fetch.js.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.d.ts.map +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/main/lib/version.js.map +1 -1
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +14 -2
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/fetch.d.ts.map +1 -1
- package/dist/module/lib/fetch.js +4 -2
- package/dist/module/lib/fetch.js.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.d.ts.map +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/module/lib/version.js.map +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/GoTrueClient.ts +13 -2
- package/src/lib/fetch.ts +4 -3
- package/src/lib/version.ts +1 -1
package/package.json
CHANGED
package/src/GoTrueClient.ts
CHANGED
|
@@ -4290,7 +4290,10 @@ 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)) {
|
|
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.
|
|
4294
4297
|
console.warn(err)
|
|
4295
4298
|
} else {
|
|
4296
4299
|
console.error(err)
|
|
@@ -4866,7 +4869,15 @@ export default class GoTrueClient {
|
|
|
4866
4869
|
} catch (err) {
|
|
4867
4870
|
this._debug(debugName, 'error', err)
|
|
4868
4871
|
|
|
4869
|
-
|
|
4872
|
+
if (isAuthRetryableFetchError(err)) {
|
|
4873
|
+
// Transient/aborted network failure during session recovery (e.g. a
|
|
4874
|
+
// superseded page navigation cancelling the in-flight request). Warn
|
|
4875
|
+
// rather than surface it raw; the session is untouched and recovery
|
|
4876
|
+
// will run again on the next load.
|
|
4877
|
+
console.warn(err)
|
|
4878
|
+
} else {
|
|
4879
|
+
console.error(err)
|
|
4880
|
+
}
|
|
4870
4881
|
return
|
|
4871
4882
|
} finally {
|
|
4872
4883
|
this._debug(debugName, 'end')
|
package/src/lib/fetch.ts
CHANGED
|
@@ -224,9 +224,10 @@ async function _handleRequest(
|
|
|
224
224
|
...requestParams,
|
|
225
225
|
})
|
|
226
226
|
} catch (e) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
//
|
|
227
|
+
// fetch failed (network / CORS / aborted request) — surfaced to the
|
|
228
|
+
// caller as a retryable error below. Deliberately not logged here: an
|
|
229
|
+
// aborted in-flight request (e.g. a superseded page navigation) is a
|
|
230
|
+
// transient condition, and logging the raw error pollutes the console.
|
|
230
231
|
throw new AuthRetryableFetchError(_getErrorMessage(e), 0)
|
|
231
232
|
}
|
|
232
233
|
|
package/src/lib/version.ts
CHANGED
|
@@ -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.
|
|
7
|
+
export const version = '2.110.8-canary.1'
|