@supabase/gotrue-js 2.119.0-canary.2 → 2.119.0-canary.4
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/README.md +10 -0
- package/dist/main/GoTrueClient.d.ts +33 -8
- package/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +85 -22
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/types.d.ts +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/module/GoTrueClient.d.ts +33 -8
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +85 -22
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/types.d.ts +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/sign-out-global-keeps-session.md +41 -0
- package/package.json +1 -1
- package/src/GoTrueClient.ts +92 -30
- package/src/lib/types.ts +1 -1
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -43,6 +43,16 @@
|
|
|
43
43
|
>
|
|
44
44
|
> Node.js 20 reached end-of-life on April 30, 2026. As announced in [our deprecation notice](https://github.com/orgs/supabase/discussions/45715), support for Node.js 20 was dropped in v2.110.0.
|
|
45
45
|
|
|
46
|
+
## Supabase Service Compatibility
|
|
47
|
+
|
|
48
|
+
`@supabase/auth-js` only guarantees compatibility with the
|
|
49
|
+
[latest Supabase Auth release](https://github.com/supabase/auth/releases). Older
|
|
50
|
+
Supabase Auth releases are supported on a best-effort basis, but compatibility
|
|
51
|
+
is not guaranteed.
|
|
52
|
+
|
|
53
|
+
If you self-host Supabase Auth, we recommend upgrading to the latest release
|
|
54
|
+
when upgrading this SDK.
|
|
55
|
+
|
|
46
56
|
## Quick start
|
|
47
57
|
|
|
48
58
|
Install
|
|
@@ -458,7 +458,7 @@ export default class GoTrueClient {
|
|
|
458
458
|
* Be aware that you may get back an error message that will not distinguish
|
|
459
459
|
* between the cases where the account does not exist or that the
|
|
460
460
|
* email/phone and password combination is wrong or that the account can only
|
|
461
|
-
* be accessed via social
|
|
461
|
+
* be accessed via social sign-in.
|
|
462
462
|
*
|
|
463
463
|
* @category Auth
|
|
464
464
|
*
|
|
@@ -592,7 +592,7 @@ export default class GoTrueClient {
|
|
|
592
592
|
* @category Auth
|
|
593
593
|
*
|
|
594
594
|
* @remarks
|
|
595
|
-
* - This method is used for signing in using [
|
|
595
|
+
* - This method is used for signing in using [social sign-in (OAuth) providers](/docs/guides/auth/social-sign-in).
|
|
596
596
|
* - It works by redirecting your application to the provider's authorization screen, before bringing back the user to your app.
|
|
597
597
|
*
|
|
598
598
|
* @example Sign in using a third-party provider
|
|
@@ -1045,7 +1045,7 @@ export default class GoTrueClient {
|
|
|
1045
1045
|
*
|
|
1046
1046
|
* Be aware that you may get back an error message that will not distinguish
|
|
1047
1047
|
* between the cases where the account does not exist or, that the account
|
|
1048
|
-
* can only be accessed via social
|
|
1048
|
+
* can only be accessed via social sign-in.
|
|
1049
1049
|
*
|
|
1050
1050
|
* Do note that you will need to configure a Whatsapp sender on Twilio
|
|
1051
1051
|
* if you are using phone sign in with the 'whatsapp' channel. The whatsapp
|
|
@@ -1995,12 +1995,31 @@ export default class GoTrueClient {
|
|
|
1995
1995
|
*/
|
|
1996
1996
|
private _isPKCECallback;
|
|
1997
1997
|
/**
|
|
1998
|
-
* Inside a browser context, `signOut()` will remove the logged in user from the browser session
|
|
1998
|
+
* Inside a browser context, `signOut()` will remove the logged in user from the browser session
|
|
1999
|
+
* and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"`
|
|
2000
|
+
* event.
|
|
1999
2001
|
*
|
|
2000
|
-
* For server-side management, you can revoke all refresh tokens for a user by passing a user's
|
|
2001
|
-
*
|
|
2002
|
+
* For server-side management, you can revoke all refresh tokens for a user by passing a user's
|
|
2003
|
+
* JWT through to `auth.api.signOut(JWT: string)`.
|
|
2002
2004
|
*
|
|
2003
|
-
*
|
|
2005
|
+
* There is no way to revoke a user's access token jwt until it expires. It is recommended to set
|
|
2006
|
+
* a shorter expiry on the jwt for this reason.
|
|
2007
|
+
*
|
|
2008
|
+
* `signOut` behavior depends on the selected scope:
|
|
2009
|
+
*
|
|
2010
|
+
* - `local`: The local session is removed first and a `SIGNED_OUT` event is fired, then the client
|
|
2011
|
+
* makes a best-effort request to revoke the refresh token on the server. If the request fails,
|
|
2012
|
+
* the client is still signed out locally and the error is returned, but the server may retain
|
|
2013
|
+
* the refresh token until it expires.
|
|
2014
|
+
*
|
|
2015
|
+
* - `global`: All of the user's sessions are first invalidated on the server. Once the server
|
|
2016
|
+
* acknowledges the request, the local session is cleared. If server logout fails, the local
|
|
2017
|
+
* session is retained, no `SIGNED_OUT` event is triggered, and the server or network error is
|
|
2018
|
+
* returned. A 401, 403, or 404 response counts as a successful sign-out.
|
|
2019
|
+
*
|
|
2020
|
+
* - `others`: All other sessions are invalidated when the server accepts the request; the
|
|
2021
|
+
* current local session remains unchanged. In case of server or network failures, the error is
|
|
2022
|
+
* returned. A `SIGNED_OUT` event is never triggered, regardless of the outcome.
|
|
2004
2023
|
*
|
|
2005
2024
|
* **Warning:** the default `scope` is `'global'`. This signs the user out of
|
|
2006
2025
|
* **every device they are currently signed in on**, not just the current
|
|
@@ -2018,7 +2037,13 @@ export default class GoTrueClient {
|
|
|
2018
2037
|
* usually what apps want on a "Sign out" button, especially when users
|
|
2019
2038
|
* sign in from multiple devices and do not expect signing out of one to
|
|
2020
2039
|
* terminate the others.
|
|
2021
|
-
* -
|
|
2040
|
+
* - With the default `global` scope, `signOut()` while offline returns an error and keeps the user
|
|
2041
|
+
* signed in. To sign out regardless, fall back to `signOut({ scope: 'local' })` when the call
|
|
2042
|
+
* returns an error.
|
|
2043
|
+
* - Since Supabase Auth uses JWTs for authentication, the access token JWT will be valid until
|
|
2044
|
+
* it's expired. When the user signs out, Supabase revokes the refresh token and deletes the
|
|
2045
|
+
* JWT from the client-side. This does not revoke the JWT and it will still be valid until it
|
|
2046
|
+
* expires.
|
|
2022
2047
|
*
|
|
2023
2048
|
* @example Sign out of every device (global – default)
|
|
2024
2049
|
* ```js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoTrueClient.d.ts","sourceRoot":"","sources":["../../src/GoTrueClient.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAY7C,OAAO,EACL,SAAS,EAgBV,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,KAAK,EAMN,MAAM,aAAa,CAAA;AACpB,OAAO,EAKL,QAAQ,EAsBT,MAAM,eAAe,CAAA;AAOtB,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EAgBZ,eAAe,EACf,YAAY,EAEZ,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EAItB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,UAAU,EACV,QAAQ,EAkBR,aAAa,EACb,kBAAkB,EAOlB,YAAY,EACZ,OAAO,EACP,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,iCAAiC,EACjC,aAAa,EACb,OAAO,EACP,6BAA6B,EAG7B,WAAW,EAEX,YAAY,EACZ,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAO1B,qCAAqC,EAErC,uCAAuC,EAIxC,MAAM,aAAa,CAAA;AAuEpB,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,MAAM,CAAC,cAAc,CAA6B;IAE1D,OAAO,CAAC,UAAU,CAAQ;IAE1B;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;IACrB;;O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ACvF,YAAY,CAAC,EAAE,OAAO,CAAA;QAEtB,+GAA+G;QAC/G,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,GAAG,EAAE,CAAA;SAAE,CAAA;KAClB,GACL,OAAO,CACN;QACE,IAAI,EAAE;YAAE,MAAM,EAAE,UAAU,CAAC;YAAC,MAAM,EAAE,SAAS,CAAC;YAAC,SAAS,EAAE,UAAU,CAAA;SAAE,CAAA;QACtE,KAAK,EAAE,IAAI,CAAA;KACZ,GACD;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,GAChC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,CAC9B;IA2FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,iBAAiB,CACrB,WAAW,CAAC,EAAE,4BAA4B,GACzC,OAAO,CAAC,uCAAuC,CAAC;IA8CnD;;;;;;;;;OASG;IACG,eAAe,CACnB,WAAW,CAAC,EAAE,0BAA0B,GACvC,OAAO,CAAC,qCAAqC,CAAC;IA2CjD;;;OAGG;YACW,yBAAyB;IAoCvC;;;OAGG;YACW,0BAA0B;IAyCxC;;;OAGG;YACW,2BAA2B;IA2BzC;;;OAGG;YACW,4BAA4B;IAiC1C;;OAEG;YACW,aAAa;IA+B3B;;OAEG;YACW,cAAc;IAoC5B;;OAEG;YACW,cAAc;CAmC7B"}
|
|
@@ -800,7 +800,7 @@ class GoTrueClient {
|
|
|
800
800
|
* Be aware that you may get back an error message that will not distinguish
|
|
801
801
|
* between the cases where the account does not exist or that the
|
|
802
802
|
* email/phone and password combination is wrong or that the account can only
|
|
803
|
-
* be accessed via social
|
|
803
|
+
* be accessed via social sign-in.
|
|
804
804
|
*
|
|
805
805
|
* @category Auth
|
|
806
806
|
*
|
|
@@ -987,7 +987,7 @@ class GoTrueClient {
|
|
|
987
987
|
* @category Auth
|
|
988
988
|
*
|
|
989
989
|
* @remarks
|
|
990
|
-
* - This method is used for signing in using [
|
|
990
|
+
* - This method is used for signing in using [social sign-in (OAuth) providers](/docs/guides/auth/social-sign-in).
|
|
991
991
|
* - It works by redirecting your application to the provider's authorization screen, before bringing back the user to your app.
|
|
992
992
|
*
|
|
993
993
|
* @example Sign in using a third-party provider
|
|
@@ -1783,7 +1783,7 @@ class GoTrueClient {
|
|
|
1783
1783
|
*
|
|
1784
1784
|
* Be aware that you may get back an error message that will not distinguish
|
|
1785
1785
|
* between the cases where the account does not exist or, that the account
|
|
1786
|
-
* can only be accessed via social
|
|
1786
|
+
* can only be accessed via social sign-in.
|
|
1787
1787
|
*
|
|
1788
1788
|
* Do note that you will need to configure a Whatsapp sender on Twilio
|
|
1789
1789
|
* if you are using phone sign in with the 'whatsapp' channel. The whatsapp
|
|
@@ -3374,12 +3374,31 @@ class GoTrueClient {
|
|
|
3374
3374
|
return !!currentStorageContent;
|
|
3375
3375
|
}
|
|
3376
3376
|
/**
|
|
3377
|
-
* Inside a browser context, `signOut()` will remove the logged in user from the browser session
|
|
3377
|
+
* Inside a browser context, `signOut()` will remove the logged in user from the browser session
|
|
3378
|
+
* and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"`
|
|
3379
|
+
* event.
|
|
3378
3380
|
*
|
|
3379
|
-
* For server-side management, you can revoke all refresh tokens for a user by passing a user's
|
|
3380
|
-
*
|
|
3381
|
+
* For server-side management, you can revoke all refresh tokens for a user by passing a user's
|
|
3382
|
+
* JWT through to `auth.api.signOut(JWT: string)`.
|
|
3381
3383
|
*
|
|
3382
|
-
*
|
|
3384
|
+
* There is no way to revoke a user's access token jwt until it expires. It is recommended to set
|
|
3385
|
+
* a shorter expiry on the jwt for this reason.
|
|
3386
|
+
*
|
|
3387
|
+
* `signOut` behavior depends on the selected scope:
|
|
3388
|
+
*
|
|
3389
|
+
* - `local`: The local session is removed first and a `SIGNED_OUT` event is fired, then the client
|
|
3390
|
+
* makes a best-effort request to revoke the refresh token on the server. If the request fails,
|
|
3391
|
+
* the client is still signed out locally and the error is returned, but the server may retain
|
|
3392
|
+
* the refresh token until it expires.
|
|
3393
|
+
*
|
|
3394
|
+
* - `global`: All of the user's sessions are first invalidated on the server. Once the server
|
|
3395
|
+
* acknowledges the request, the local session is cleared. If server logout fails, the local
|
|
3396
|
+
* session is retained, no `SIGNED_OUT` event is triggered, and the server or network error is
|
|
3397
|
+
* returned. A 401, 403, or 404 response counts as a successful sign-out.
|
|
3398
|
+
*
|
|
3399
|
+
* - `others`: All other sessions are invalidated when the server accepts the request; the
|
|
3400
|
+
* current local session remains unchanged. In case of server or network failures, the error is
|
|
3401
|
+
* returned. A `SIGNED_OUT` event is never triggered, regardless of the outcome.
|
|
3383
3402
|
*
|
|
3384
3403
|
* **Warning:** the default `scope` is `'global'`. This signs the user out of
|
|
3385
3404
|
* **every device they are currently signed in on**, not just the current
|
|
@@ -3397,7 +3416,13 @@ class GoTrueClient {
|
|
|
3397
3416
|
* usually what apps want on a "Sign out" button, especially when users
|
|
3398
3417
|
* sign in from multiple devices and do not expect signing out of one to
|
|
3399
3418
|
* terminate the others.
|
|
3400
|
-
* -
|
|
3419
|
+
* - With the default `global` scope, `signOut()` while offline returns an error and keeps the user
|
|
3420
|
+
* signed in. To sign out regardless, fall back to `signOut({ scope: 'local' })` when the call
|
|
3421
|
+
* returns an error.
|
|
3422
|
+
* - Since Supabase Auth uses JWTs for authentication, the access token JWT will be valid until
|
|
3423
|
+
* it's expired. When the user signs out, Supabase revokes the refresh token and deletes the
|
|
3424
|
+
* JWT from the client-side. This does not revoke the JWT and it will still be valid until it
|
|
3425
|
+
* expires.
|
|
3401
3426
|
*
|
|
3402
3427
|
* @example Sign out of every device (global – default)
|
|
3403
3428
|
* ```js
|
|
@@ -3424,7 +3449,7 @@ class GoTrueClient {
|
|
|
3424
3449
|
}
|
|
3425
3450
|
return await this._signOut(options);
|
|
3426
3451
|
}
|
|
3427
|
-
async _signOut({ scope
|
|
3452
|
+
async _signOut({ scope = 'global' } = {}) {
|
|
3428
3453
|
return await this._useSession(async (result) => {
|
|
3429
3454
|
var _a;
|
|
3430
3455
|
const removeCurrentSession = async () => {
|
|
@@ -3432,28 +3457,66 @@ class GoTrueClient {
|
|
|
3432
3457
|
};
|
|
3433
3458
|
const { data, error: sessionError } = result;
|
|
3434
3459
|
if (sessionError && !(0, errors_1.isAuthSessionMissingError)(sessionError)) {
|
|
3460
|
+
// A retryable refresh failure (offline, 5xx) leaves the session in storage and no access
|
|
3461
|
+
// token to revoke with, so `local` still has to sign out this device. A rejected refresh
|
|
3462
|
+
// has already removed the session and fired `SIGNED_OUT`.
|
|
3463
|
+
if (scope === 'local' && (0, errors_1.isAuthRetryableFetchError)(sessionError)) {
|
|
3464
|
+
await removeCurrentSession();
|
|
3465
|
+
}
|
|
3435
3466
|
return this._returnResult({ error: sessionError });
|
|
3436
3467
|
}
|
|
3437
3468
|
const accessToken = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token;
|
|
3469
|
+
let removeError = null;
|
|
3470
|
+
const finish = (value) => {
|
|
3471
|
+
if (removeError) {
|
|
3472
|
+
throw removeError.thrown;
|
|
3473
|
+
}
|
|
3474
|
+
return value;
|
|
3475
|
+
};
|
|
3476
|
+
if (scope === 'local') {
|
|
3477
|
+
// The local session is removed before the request is sent, so signing out of this device
|
|
3478
|
+
// never depends on the network. The request only revokes the refresh token on the server.
|
|
3479
|
+
// A throwing `SIGNED_OUT` subscriber must not skip that request, so its error is rethrown
|
|
3480
|
+
// once the request has been attempted.
|
|
3481
|
+
try {
|
|
3482
|
+
await removeCurrentSession();
|
|
3483
|
+
}
|
|
3484
|
+
catch (thrown) {
|
|
3485
|
+
removeError = { thrown };
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3438
3488
|
if (accessToken) {
|
|
3439
3489
|
const { error } = await this.admin.signOut(accessToken, scope);
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3490
|
+
// The current behavior is wrong for the current version of auth (v2.197.0). However,
|
|
3491
|
+
// changing it could be considered a breaking change and must wait for v3. Before modifying
|
|
3492
|
+
// this code we also need to consider which range of Auth versions we aim to support. Right
|
|
3493
|
+
// now this is not defined and thus undefined.
|
|
3494
|
+
//
|
|
3495
|
+
// Some constraints to be aware of:
|
|
3496
|
+
// - Since supabase/auth v2.145.0 a missing user answers 403 `user_not_found`.
|
|
3497
|
+
// - Since supabase/auth v2.150.0 a missing session answers 403 `session_not_found`.
|
|
3498
|
+
// - Before v2.145.0 an invalid JWT answered 401.
|
|
3499
|
+
// - Before v2.145.0 a missing user answers 404., so those statuses are treated the same way.
|
|
3500
|
+
//
|
|
3501
|
+
// TODO(v3): if we only support auth v2.150.0 or later, change this to:
|
|
3502
|
+
// - Match on `error.code` instead of `error.status`, and treat only 403 `session_not_found`
|
|
3503
|
+
// and `user_not_found` as already signed out. Drop the 401 and 404 handling.
|
|
3504
|
+
// - Return every other error, e.g. 403 `bad_jwt` or `user_banned`, or a 401 or 404 from a
|
|
3505
|
+
// gateway, instead of treating it as signed out. Today nothing was revoked, yet the
|
|
3506
|
+
// session is cleared and `error` is null. With `global` the session is then kept.
|
|
3507
|
+
// - For `others`, return `session_not_found` as well. It describes the current session, not
|
|
3508
|
+
// the sessions being revoked.
|
|
3509
|
+
if (error &&
|
|
3510
|
+
!(((0, errors_1.isAuthApiError)(error) &&
|
|
3444
3511
|
(error.status === 404 || error.status === 401 || error.status === 403)) ||
|
|
3445
3512
|
(0, errors_1.isAuthSessionMissingError)(error))) {
|
|
3446
|
-
|
|
3447
|
-
await removeCurrentSession();
|
|
3448
|
-
}
|
|
3449
|
-
return this._returnResult({ error });
|
|
3450
|
-
}
|
|
3513
|
+
return finish(this._returnResult({ error }));
|
|
3451
3514
|
}
|
|
3452
3515
|
}
|
|
3453
|
-
if (scope
|
|
3516
|
+
if (scope === 'global') {
|
|
3454
3517
|
await removeCurrentSession();
|
|
3455
3518
|
}
|
|
3456
|
-
return this._returnResult({ error: null });
|
|
3519
|
+
return finish(this._returnResult({ error: null }));
|
|
3457
3520
|
});
|
|
3458
3521
|
}
|
|
3459
3522
|
/** *
|
|
@@ -3541,9 +3604,9 @@ class GoTrueClient {
|
|
|
3541
3604
|
* ```
|
|
3542
3605
|
*
|
|
3543
3606
|
* @exampleDescription Store OAuth provider tokens on sign in
|
|
3544
|
-
* When using [OAuth (
|
|
3607
|
+
* When using [OAuth (social sign-in)](/docs/guides/auth/social-sign-in) you sometimes wish to get access to the provider's access token and refresh token, in order to call provider APIs in the name of the user.
|
|
3545
3608
|
*
|
|
3546
|
-
* For example, if you are using [Sign in with Google](/docs/guides/auth/social-
|
|
3609
|
+
* For example, if you are using [Sign in with Google](/docs/guides/auth/social-sign-in/auth-google) you may want to use the provider token to call Google APIs on behalf of the user. Supabase Auth does not keep track of the provider access and refresh token, but does return them for you once, immediately after sign in. You can use the `onAuthStateChange` method to listen for the presence of the provider tokens and store them in local storage. You can further send them to your server's APIs for use on the backend.
|
|
3547
3610
|
*
|
|
3548
3611
|
* Finally, make sure you remove them from local storage on the `SIGNED_OUT` event. If the OAuth provider supports token revocation, make sure you call those APIs either from the frontend or schedule them to be called on the backend.
|
|
3549
3612
|
*
|