@supabase/gotrue-js
Advanced tools
Comparing version 2.65.0-rc.3 to 2.65.0-rc.4
@@ -34,2 +34,3 @@ import { WeakPasswordReasons } from './types'; | ||
} | ||
export declare function isAuthSessionMissingError(error: any): error is AuthSessionMissingError; | ||
export declare class AuthInvalidTokenResponseError extends CustomAuthError { | ||
@@ -36,0 +37,0 @@ constructor(); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isAuthWeakPasswordError = exports.AuthWeakPasswordError = exports.isAuthRetryableFetchError = exports.AuthRetryableFetchError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.isAuthApiError = exports.AuthApiError = exports.isAuthError = exports.AuthError = void 0; | ||
exports.isAuthWeakPasswordError = exports.AuthWeakPasswordError = exports.isAuthRetryableFetchError = exports.AuthRetryableFetchError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.isAuthSessionMissingError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.isAuthApiError = exports.AuthApiError = exports.isAuthError = exports.AuthError = void 0; | ||
class AuthError extends Error { | ||
@@ -53,2 +53,6 @@ constructor(message, status, code) { | ||
exports.AuthSessionMissingError = AuthSessionMissingError; | ||
function isAuthSessionMissingError(error) { | ||
return isAuthError(error) && error.name === 'AuthSessionMissingError'; | ||
} | ||
exports.isAuthSessionMissingError = isAuthSessionMissingError; | ||
class AuthInvalidTokenResponseError extends CustomAuthError { | ||
@@ -55,0 +59,0 @@ constructor() { |
@@ -63,2 +63,8 @@ "use strict"; | ||
} | ||
else if (errorCode === 'session_not_found') { | ||
// The `session_id` inside the JWT does not correspond to a row in the | ||
// `sessions` table. This usually means the user has signed out, has been | ||
// deleted, or their session has somehow been terminated. | ||
throw new errors_1.AuthSessionMissingError(); | ||
} | ||
throw new errors_1.AuthApiError(_getErrorMessage(data), error.status || 500, errorCode); | ||
@@ -65,0 +71,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.65.0-rc.3"; | ||
export declare const version = "2.65.0-rc.4"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '2.65.0-rc.3'; | ||
exports.version = '2.65.0-rc.4'; | ||
//# sourceMappingURL=version.js.map |
@@ -34,2 +34,3 @@ import { WeakPasswordReasons } from './types'; | ||
} | ||
export declare function isAuthSessionMissingError(error: any): error is AuthSessionMissingError; | ||
export declare class AuthInvalidTokenResponseError extends CustomAuthError { | ||
@@ -36,0 +37,0 @@ constructor(); |
@@ -43,2 +43,5 @@ export class AuthError extends Error { | ||
} | ||
export function isAuthSessionMissingError(error) { | ||
return isAuthError(error) && error.name === 'AuthSessionMissingError'; | ||
} | ||
export class AuthInvalidTokenResponseError extends CustomAuthError { | ||
@@ -45,0 +48,0 @@ constructor() { |
@@ -14,3 +14,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { expiresAt, looksLikeFetchResponse, parseResponseAPIVersion } from './helpers'; | ||
import { AuthApiError, AuthRetryableFetchError, AuthWeakPasswordError, AuthUnknownError, } from './errors'; | ||
import { AuthApiError, AuthRetryableFetchError, AuthWeakPasswordError, AuthUnknownError, AuthSessionMissingError, } from './errors'; | ||
const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err); | ||
@@ -61,2 +61,8 @@ const NETWORK_ERROR_CODES = [502, 503, 504]; | ||
} | ||
else if (errorCode === 'session_not_found') { | ||
// The `session_id` inside the JWT does not correspond to a row in the | ||
// `sessions` table. This usually means the user has signed out, has been | ||
// deleted, or their session has somehow been terminated. | ||
throw new AuthSessionMissingError(); | ||
} | ||
throw new AuthApiError(_getErrorMessage(data), error.status || 500, errorCode); | ||
@@ -63,0 +69,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.65.0-rc.3"; | ||
export declare const version = "2.65.0-rc.4"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = '2.65.0-rc.3'; | ||
export const version = '2.65.0-rc.4'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@supabase/gotrue-js", | ||
"version": "2.65.0-rc.3", | ||
"version": "2.65.0-rc.4", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Official client library for Supabase Auth", |
@@ -72,2 +72,6 @@ import { WeakPasswordReasons } from './types' | ||
export function isAuthSessionMissingError(error: any): error is AuthSessionMissingError { | ||
return isAuthError(error) && error.name === 'AuthSessionMissingError' | ||
} | ||
export class AuthInvalidTokenResponseError extends CustomAuthError { | ||
@@ -74,0 +78,0 @@ constructor() { |
@@ -17,2 +17,3 @@ import { API_VERSIONS, API_VERSION_HEADER_NAME } from './constants' | ||
AuthUnknownError, | ||
AuthSessionMissingError, | ||
} from './errors' | ||
@@ -95,2 +96,7 @@ | ||
) | ||
} else if (errorCode === 'session_not_found') { | ||
// The `session_id` inside the JWT does not correspond to a row in the | ||
// `sessions` table. This usually means the user has signed out, has been | ||
// deleted, or their session has somehow been terminated. | ||
throw new AuthSessionMissingError() | ||
} | ||
@@ -97,0 +103,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const version = '2.65.0-rc.3' | ||
export const version = '2.65.0-rc.4' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
808287
14432