@supabase/auth-js 2.117.0-canary.0 → 2.117.0
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/GoTrueAdminApi.d.ts +0 -6
- package/dist/main/GoTrueAdminApi.d.ts.map +1 -1
- package/dist/main/GoTrueAdminApi.js +0 -6
- package/dist/main/GoTrueAdminApi.js.map +1 -1
- package/dist/main/GoTrueClient.d.ts +1 -5
- package/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +1 -12
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/helpers.d.ts +0 -3
- package/dist/main/lib/helpers.d.ts.map +1 -1
- package/dist/main/lib/helpers.js +0 -6
- package/dist/main/lib/helpers.js.map +1 -1
- package/dist/main/lib/types.d.ts +7 -6
- package/dist/main/lib/types.d.ts.map +1 -1
- package/dist/main/lib/types.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/GoTrueAdminApi.d.ts +0 -6
- package/dist/module/GoTrueAdminApi.d.ts.map +1 -1
- package/dist/module/GoTrueAdminApi.js +1 -7
- package/dist/module/GoTrueAdminApi.js.map +1 -1
- package/dist/module/GoTrueClient.d.ts +1 -5
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +2 -13
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/helpers.d.ts +0 -3
- package/dist/module/lib/helpers.d.ts.map +1 -1
- package/dist/module/lib/helpers.js +0 -5
- package/dist/module/lib/helpers.js.map +1 -1
- package/dist/module/lib/types.d.ts +7 -6
- package/dist/module/lib/types.d.ts.map +1 -1
- package/dist/module/lib/types.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/GoTrueAdminApi.ts +1 -9
- package/src/GoTrueClient.ts +1 -15
- package/src/lib/helpers.ts +0 -8
- package/src/lib/types.ts +7 -6
- package/src/lib/version.ts +1 -1
|
@@ -2,7 +2,7 @@ import GoTrueAdminApi from './GoTrueAdminApi';
|
|
|
2
2
|
import { AUTO_REFRESH_TICK_DURATION_MS, AUTO_REFRESH_TICK_THRESHOLD, DEFAULT_HEADERS, EXPIRY_MARGIN_MS, GOTRUE_URL, JWKS_TTL, PKCE_FLOW_ID_PARAM, REFRESH_FAILURE_COOLDOWN_MS, STORAGE_KEY, } from './lib/constants';
|
|
3
3
|
import { AuthImplicitGrantRedirectError, AuthInvalidCredentialsError, AuthInvalidJwtError, AuthInvalidTokenResponseError, AuthPKCECodeVerifierMissingError, AuthPKCEGrantCodeExchangeError, AuthRefreshDiscardedError, AuthSessionMissingError, AuthUnknownError, isAuthApiError, isAuthError, isAuthImplicitGrantRedirectError, isAuthRefreshDiscardedError, isAuthRetryableFetchError, isAuthSessionMissingError, } from './lib/errors';
|
|
4
4
|
import { _request, _sessionResponse, _sessionResponsePassword, _ssoResponse, _userResponse, } from './lib/fetch';
|
|
5
|
-
import { appendFlowIdToRedirectTo,
|
|
5
|
+
import { appendFlowIdToRedirectTo, assertRecoveryCodesExperimentalEnabled, decodeJWT, deepClone, Deferred, expiresAt, generateCallbackId, getAlgorithm, getCodeChallengeAndMethod, getItemAsync, insecureUserWarningProxy, isBrowser, parseParametersFromURL, pkceVerifierSlotKey, removeAllPKCEVerifiers, removeItemAsync, removePKCEVerifier, resolveFetch, retrievePKCEVerifier, retryable, setItemAsync, sleep, supportsLocalStorage, userNotAvailableProxy, validateExp, validatePKCEFlowId, } from './lib/helpers';
|
|
6
6
|
import { memoryLocalStorageAdapter } from './lib/local-storage';
|
|
7
7
|
import { LockAcquireTimeoutError } from './lib/locks';
|
|
8
8
|
import { polyfillGlobalThis } from './lib/polyfills';
|
|
@@ -5596,8 +5596,6 @@ class GoTrueClient {
|
|
|
5596
5596
|
* resolves with a `WebAuthnError` whose code is `ERROR_CEREMONY_ABORTED`. If
|
|
5597
5597
|
* you pass your own `signal`, abort it before retrying.
|
|
5598
5598
|
*
|
|
5599
|
-
* Requires `auth.experimental.passkey: true`.
|
|
5600
|
-
*
|
|
5601
5599
|
* @category Auth
|
|
5602
5600
|
*
|
|
5603
5601
|
* @example Sign in with Conditional UI (passkey autofill)
|
|
@@ -5612,7 +5610,6 @@ class GoTrueClient {
|
|
|
5612
5610
|
*/
|
|
5613
5611
|
async signInWithPasskey(credentials) {
|
|
5614
5612
|
var _a, _b, _c, _d;
|
|
5615
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5616
5613
|
try {
|
|
5617
5614
|
if (!browserSupportsWebAuthn()) {
|
|
5618
5615
|
return this._returnResult({
|
|
@@ -5661,13 +5658,12 @@ class GoTrueClient {
|
|
|
5661
5658
|
* 2. Prompts user via navigator.credentials.create()
|
|
5662
5659
|
* 3. Verifies credential with server
|
|
5663
5660
|
*
|
|
5664
|
-
* Requires an active session.
|
|
5661
|
+
* Requires an active session.
|
|
5665
5662
|
*
|
|
5666
5663
|
* @category Auth
|
|
5667
5664
|
*/
|
|
5668
5665
|
async registerPasskey(credentials) {
|
|
5669
5666
|
var _a, _b;
|
|
5670
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5671
5667
|
try {
|
|
5672
5668
|
if (!browserSupportsWebAuthn()) {
|
|
5673
5669
|
return this._returnResult({
|
|
@@ -5712,7 +5708,6 @@ class GoTrueClient {
|
|
|
5712
5708
|
* Returns WebAuthn credential creation options to pass to navigator.credentials.create().
|
|
5713
5709
|
*/
|
|
5714
5710
|
async _startPasskeyRegistration() {
|
|
5715
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5716
5711
|
try {
|
|
5717
5712
|
return await this._useSession(async (result) => {
|
|
5718
5713
|
const { data: { session }, error: sessionError, } = result;
|
|
@@ -5745,7 +5740,6 @@ class GoTrueClient {
|
|
|
5745
5740
|
* The credentialResponse should be the serialized output of navigator.credentials.create().
|
|
5746
5741
|
*/
|
|
5747
5742
|
async _verifyPasskeyRegistration(params) {
|
|
5748
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5749
5743
|
try {
|
|
5750
5744
|
return await this._useSession(async (result) => {
|
|
5751
5745
|
const { data: { session }, error: sessionError, } = result;
|
|
@@ -5782,7 +5776,6 @@ class GoTrueClient {
|
|
|
5782
5776
|
*/
|
|
5783
5777
|
async _startPasskeyAuthentication(params) {
|
|
5784
5778
|
var _a;
|
|
5785
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5786
5779
|
try {
|
|
5787
5780
|
const { data, error } = await _request(this.fetch, 'POST', `${this.url}/passkeys/authentication/options`, {
|
|
5788
5781
|
headers: this.headers,
|
|
@@ -5807,7 +5800,6 @@ class GoTrueClient {
|
|
|
5807
5800
|
* The credential should be the serialized output of navigator.credentials.get().
|
|
5808
5801
|
*/
|
|
5809
5802
|
async _verifyPasskeyAuthentication(params) {
|
|
5810
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5811
5803
|
try {
|
|
5812
5804
|
const { data, error } = await _request(this.fetch, 'POST', `${this.url}/passkeys/authentication/verify`, {
|
|
5813
5805
|
headers: this.headers,
|
|
@@ -5837,7 +5829,6 @@ class GoTrueClient {
|
|
|
5837
5829
|
* List all passkeys for the current user.
|
|
5838
5830
|
*/
|
|
5839
5831
|
async _listPasskeys() {
|
|
5840
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5841
5832
|
try {
|
|
5842
5833
|
return await this._useSession(async (result) => {
|
|
5843
5834
|
const { data: { session }, error: sessionError, } = result;
|
|
@@ -5869,7 +5860,6 @@ class GoTrueClient {
|
|
|
5869
5860
|
* Update a passkey.
|
|
5870
5861
|
*/
|
|
5871
5862
|
async _updatePasskey(params) {
|
|
5872
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5873
5863
|
try {
|
|
5874
5864
|
return await this._useSession(async (result) => {
|
|
5875
5865
|
const { data: { session }, error: sessionError, } = result;
|
|
@@ -5901,7 +5891,6 @@ class GoTrueClient {
|
|
|
5901
5891
|
* Delete a passkey.
|
|
5902
5892
|
*/
|
|
5903
5893
|
async _deletePasskey(params) {
|
|
5904
|
-
assertPasskeyExperimentalEnabled(this.experimental);
|
|
5905
5894
|
try {
|
|
5906
5895
|
return await this._useSession(async (result) => {
|
|
5907
5896
|
const { data: { session }, error: sessionError, } = result;
|