@depup/supabase__auth-js 2.99.2-depup.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/LICENSE +21 -0
- package/README.md +25 -0
- package/changes.json +5 -0
- package/dist/main/AuthAdminApi.d.ts +4 -0
- package/dist/main/AuthAdminApi.d.ts.map +1 -0
- package/dist/main/AuthAdminApi.js +7 -0
- package/dist/main/AuthAdminApi.js.map +1 -0
- package/dist/main/AuthClient.d.ts +4 -0
- package/dist/main/AuthClient.d.ts.map +1 -0
- package/dist/main/AuthClient.js +7 -0
- package/dist/main/AuthClient.js.map +1 -0
- package/dist/main/GoTrueAdminApi.d.ts +227 -0
- package/dist/main/GoTrueAdminApi.d.ts.map +1 -0
- package/dist/main/GoTrueAdminApi.js +596 -0
- package/dist/main/GoTrueAdminApi.js.map +1 -0
- package/dist/main/GoTrueClient.d.ts +783 -0
- package/dist/main/GoTrueClient.d.ts.map +1 -0
- package/dist/main/GoTrueClient.js +3029 -0
- package/dist/main/GoTrueClient.js.map +1 -0
- package/dist/main/index.d.ts +9 -0
- package/dist/main/index.d.ts.map +1 -0
- package/dist/main/index.js +20 -0
- package/dist/main/index.js.map +1 -0
- package/dist/main/lib/base64url.d.ts +76 -0
- package/dist/main/lib/base64url.d.ts.map +1 -0
- package/dist/main/lib/base64url.js +269 -0
- package/dist/main/lib/base64url.js.map +1 -0
- package/dist/main/lib/constants.d.ts +26 -0
- package/dist/main/lib/constants.d.ts.map +1 -0
- package/dist/main/lib/constants.js +31 -0
- package/dist/main/lib/constants.js.map +1 -0
- package/dist/main/lib/error-codes.d.ts +7 -0
- package/dist/main/lib/error-codes.d.ts.map +1 -0
- package/dist/main/lib/error-codes.js +3 -0
- package/dist/main/lib/error-codes.js.map +1 -0
- package/dist/main/lib/errors.d.ts +243 -0
- package/dist/main/lib/errors.d.ts.map +1 -0
- package/dist/main/lib/errors.js +289 -0
- package/dist/main/lib/errors.js.map +1 -0
- package/dist/main/lib/fetch.d.ts +34 -0
- package/dist/main/lib/fetch.d.ts.map +1 -0
- package/dist/main/lib/fetch.js +184 -0
- package/dist/main/lib/fetch.js.map +1 -0
- package/dist/main/lib/helpers.d.ts +91 -0
- package/dist/main/lib/helpers.d.ts.map +1 -0
- package/dist/main/lib/helpers.js +395 -0
- package/dist/main/lib/helpers.js.map +1 -0
- package/dist/main/lib/local-storage.d.ts +9 -0
- package/dist/main/lib/local-storage.d.ts.map +1 -0
- package/dist/main/lib/local-storage.js +21 -0
- package/dist/main/lib/local-storage.js.map +1 -0
- package/dist/main/lib/locks.d.ts +107 -0
- package/dist/main/lib/locks.d.ts.map +1 -0
- package/dist/main/lib/locks.js +314 -0
- package/dist/main/lib/locks.js.map +1 -0
- package/dist/main/lib/polyfills.d.ts +5 -0
- package/dist/main/lib/polyfills.d.ts.map +1 -0
- package/dist/main/lib/polyfills.js +29 -0
- package/dist/main/lib/polyfills.js.map +1 -0
- package/dist/main/lib/types.d.ts +1861 -0
- package/dist/main/lib/types.d.ts.map +1 -0
- package/dist/main/lib/types.js +23 -0
- package/dist/main/lib/types.js.map +1 -0
- package/dist/main/lib/version.d.ts +2 -0
- package/dist/main/lib/version.d.ts.map +1 -0
- package/dist/main/lib/version.js +11 -0
- package/dist/main/lib/version.js.map +1 -0
- package/dist/main/lib/web3/ethereum.d.ts +96 -0
- package/dist/main/lib/web3/ethereum.d.ts.map +1 -0
- package/dist/main/lib/web3/ethereum.js +66 -0
- package/dist/main/lib/web3/ethereum.js.map +1 -0
- package/dist/main/lib/web3/solana.d.ts +160 -0
- package/dist/main/lib/web3/solana.d.ts.map +1 -0
- package/dist/main/lib/web3/solana.js +4 -0
- package/dist/main/lib/web3/solana.js.map +1 -0
- package/dist/main/lib/webauthn.d.ts +276 -0
- package/dist/main/lib/webauthn.d.ts.map +1 -0
- package/dist/main/lib/webauthn.dom.d.ts +583 -0
- package/dist/main/lib/webauthn.dom.d.ts.map +1 -0
- package/dist/main/lib/webauthn.dom.js +4 -0
- package/dist/main/lib/webauthn.dom.js.map +1 -0
- package/dist/main/lib/webauthn.errors.d.ts +80 -0
- package/dist/main/lib/webauthn.errors.d.ts.map +1 -0
- package/dist/main/lib/webauthn.errors.js +265 -0
- package/dist/main/lib/webauthn.errors.js.map +1 -0
- package/dist/main/lib/webauthn.js +706 -0
- package/dist/main/lib/webauthn.js.map +1 -0
- package/dist/module/AuthAdminApi.d.ts +4 -0
- package/dist/module/AuthAdminApi.d.ts.map +1 -0
- package/dist/module/AuthAdminApi.js +4 -0
- package/dist/module/AuthAdminApi.js.map +1 -0
- package/dist/module/AuthClient.d.ts +4 -0
- package/dist/module/AuthClient.d.ts.map +1 -0
- package/dist/module/AuthClient.js +4 -0
- package/dist/module/AuthClient.js.map +1 -0
- package/dist/module/GoTrueAdminApi.d.ts +227 -0
- package/dist/module/GoTrueAdminApi.d.ts.map +1 -0
- package/dist/module/GoTrueAdminApi.js +593 -0
- package/dist/module/GoTrueAdminApi.js.map +1 -0
- package/dist/module/GoTrueClient.d.ts +783 -0
- package/dist/module/GoTrueClient.d.ts.map +1 -0
- package/dist/module/GoTrueClient.js +3026 -0
- package/dist/module/GoTrueClient.js.map +1 -0
- package/dist/module/index.d.ts +9 -0
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.js +9 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/lib/base64url.d.ts +76 -0
- package/dist/module/lib/base64url.d.ts.map +1 -0
- package/dist/module/lib/base64url.js +257 -0
- package/dist/module/lib/base64url.js.map +1 -0
- package/dist/module/lib/constants.d.ts +26 -0
- package/dist/module/lib/constants.d.ts.map +1 -0
- package/dist/module/lib/constants.js +28 -0
- package/dist/module/lib/constants.js.map +1 -0
- package/dist/module/lib/error-codes.d.ts +7 -0
- package/dist/module/lib/error-codes.d.ts.map +1 -0
- package/dist/module/lib/error-codes.js +2 -0
- package/dist/module/lib/error-codes.js.map +1 -0
- package/dist/module/lib/errors.d.ts +243 -0
- package/dist/module/lib/errors.d.ts.map +1 -0
- package/dist/module/lib/errors.js +266 -0
- package/dist/module/lib/errors.js.map +1 -0
- package/dist/module/lib/fetch.d.ts +34 -0
- package/dist/module/lib/fetch.d.ts.map +1 -0
- package/dist/module/lib/fetch.js +174 -0
- package/dist/module/lib/fetch.js.map +1 -0
- package/dist/module/lib/helpers.d.ts +91 -0
- package/dist/module/lib/helpers.d.ts.map +1 -0
- package/dist/module/lib/helpers.js +368 -0
- package/dist/module/lib/helpers.js.map +1 -0
- package/dist/module/lib/local-storage.d.ts +9 -0
- package/dist/module/lib/local-storage.d.ts.map +1 -0
- package/dist/module/lib/local-storage.js +18 -0
- package/dist/module/lib/local-storage.js.map +1 -0
- package/dist/module/lib/locks.d.ts +107 -0
- package/dist/module/lib/locks.d.ts.map +1 -0
- package/dist/module/lib/locks.js +306 -0
- package/dist/module/lib/locks.js.map +1 -0
- package/dist/module/lib/polyfills.d.ts +5 -0
- package/dist/module/lib/polyfills.d.ts.map +1 -0
- package/dist/module/lib/polyfills.js +26 -0
- package/dist/module/lib/polyfills.js.map +1 -0
- package/dist/module/lib/types.d.ts +1861 -0
- package/dist/module/lib/types.d.ts.map +1 -0
- package/dist/module/lib/types.js +20 -0
- package/dist/module/lib/types.js.map +1 -0
- package/dist/module/lib/version.d.ts +2 -0
- package/dist/module/lib/version.d.ts.map +1 -0
- package/dist/module/lib/version.js +8 -0
- package/dist/module/lib/version.js.map +1 -0
- package/dist/module/lib/web3/ethereum.d.ts +96 -0
- package/dist/module/lib/web3/ethereum.d.ts.map +1 -0
- package/dist/module/lib/web3/ethereum.js +60 -0
- package/dist/module/lib/web3/ethereum.js.map +1 -0
- package/dist/module/lib/web3/solana.d.ts +160 -0
- package/dist/module/lib/web3/solana.d.ts.map +1 -0
- package/dist/module/lib/web3/solana.js +3 -0
- package/dist/module/lib/web3/solana.js.map +1 -0
- package/dist/module/lib/webauthn.d.ts +276 -0
- package/dist/module/lib/webauthn.d.ts.map +1 -0
- package/dist/module/lib/webauthn.dom.d.ts +583 -0
- package/dist/module/lib/webauthn.dom.d.ts.map +1 -0
- package/dist/module/lib/webauthn.dom.js +3 -0
- package/dist/module/lib/webauthn.dom.js.map +1 -0
- package/dist/module/lib/webauthn.errors.d.ts +80 -0
- package/dist/module/lib/webauthn.errors.d.ts.map +1 -0
- package/dist/module/lib/webauthn.errors.js +257 -0
- package/dist/module/lib/webauthn.errors.js.map +1 -0
- package/dist/module/lib/webauthn.js +689 -0
- package/dist/module/lib/webauthn.js.map +1 -0
- package/dist/tsconfig.module.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +56 -0
- package/src/AuthAdminApi.ts +5 -0
- package/src/AuthClient.ts +5 -0
- package/src/GoTrueAdminApi.ts +723 -0
- package/src/GoTrueClient.ts +4078 -0
- package/src/index.ts +13 -0
- package/src/lib/base64url.ts +308 -0
- package/src/lib/constants.ts +34 -0
- package/src/lib/error-codes.ts +90 -0
- package/src/lib/errors.ts +324 -0
- package/src/lib/fetch.ts +283 -0
- package/src/lib/helpers.ts +463 -0
- package/src/lib/local-storage.ts +21 -0
- package/src/lib/locks.ts +375 -0
- package/src/lib/polyfills.ts +23 -0
- package/src/lib/types.ts +2229 -0
- package/src/lib/version.ts +7 -0
- package/src/lib/web3/ethereum.ts +184 -0
- package/src/lib/web3/solana.ts +186 -0
- package/src/lib/webauthn.dom.ts +636 -0
- package/src/lib/webauthn.errors.ts +317 -0
- package/src/lib/webauthn.ts +946 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Supabase
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @depup/supabase__auth-js
|
|
2
|
+
|
|
3
|
+
> Dependency-bumped version of [@supabase/auth-js](https://www.npmjs.com/package/@supabase/auth-js)
|
|
4
|
+
|
|
5
|
+
Generated by [DepUp](https://github.com/depup/npm) -- all production
|
|
6
|
+
dependencies bumped to latest versions.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @depup/supabase__auth-js
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Field | Value |
|
|
15
|
+
|-------|-------|
|
|
16
|
+
| Original | [@supabase/auth-js](https://www.npmjs.com/package/@supabase/auth-js) @ 2.99.2 |
|
|
17
|
+
| Processed | 2026-03-17 |
|
|
18
|
+
| Smoke test | passed |
|
|
19
|
+
| Deps updated | 0 |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/@supabase/auth-js
|
|
24
|
+
|
|
25
|
+
License inherited from the original package.
|
package/changes.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthAdminApi.d.ts","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,QAAA,MAAM,YAAY,uBAAiB,CAAA;AAEnC,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const GoTrueAdminApi_1 = tslib_1.__importDefault(require("./GoTrueAdminApi"));
|
|
5
|
+
const AuthAdminApi = GoTrueAdminApi_1.default;
|
|
6
|
+
exports.default = AuthAdminApi;
|
|
7
|
+
//# sourceMappingURL=AuthAdminApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthAdminApi.js","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":";;;AAAA,8EAA6C;AAE7C,MAAM,YAAY,GAAG,wBAAc,CAAA;AAEnC,kBAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthClient.d.ts","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,QAAA,MAAM,UAAU,qBAAe,CAAA;AAE/B,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const GoTrueClient_1 = tslib_1.__importDefault(require("./GoTrueClient"));
|
|
5
|
+
const AuthClient = GoTrueClient_1.default;
|
|
6
|
+
exports.default = AuthClient;
|
|
7
|
+
//# sourceMappingURL=AuthClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthClient.js","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":";;;AAAA,0EAAyC;AAEzC,MAAM,UAAU,GAAG,sBAAY,CAAA;AAE/B,kBAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Fetch } from './lib/fetch';
|
|
2
|
+
import { AdminUserAttributes, GenerateLinkParams, GenerateLinkResponse, Pagination, User, UserResponse, GoTrueAdminMFAApi, PageParams, SignOutScope, GoTrueAdminOAuthApi, GoTrueAdminCustomProvidersApi } from './lib/types';
|
|
3
|
+
import { AuthError } from './lib/errors';
|
|
4
|
+
export default class GoTrueAdminApi {
|
|
5
|
+
/** Contains all MFA administration methods. */
|
|
6
|
+
mfa: GoTrueAdminMFAApi;
|
|
7
|
+
/**
|
|
8
|
+
* Contains all OAuth client administration methods.
|
|
9
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
10
|
+
*/
|
|
11
|
+
oauth: GoTrueAdminOAuthApi;
|
|
12
|
+
/** Contains all custom OIDC/OAuth provider administration methods. */
|
|
13
|
+
customProviders: GoTrueAdminCustomProvidersApi;
|
|
14
|
+
protected url: string;
|
|
15
|
+
protected headers: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
protected fetch: Fetch;
|
|
19
|
+
/**
|
|
20
|
+
* Creates an admin API client that can be used to manage users and OAuth clients.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { GoTrueAdminApi } from '@supabase/auth-js'
|
|
25
|
+
*
|
|
26
|
+
* const admin = new GoTrueAdminApi({
|
|
27
|
+
* url: 'https://xyzcompany.supabase.co/auth/v1',
|
|
28
|
+
* headers: { Authorization: `Bearer ${process.env.SUPABASE_SERVICE_ROLE_KEY}` },
|
|
29
|
+
* })
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
constructor({ url, headers, fetch, }: {
|
|
33
|
+
url: string;
|
|
34
|
+
headers?: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
fetch?: Fetch;
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Removes a logged-in session.
|
|
41
|
+
* @param jwt A valid, logged-in JWT.
|
|
42
|
+
* @param scope The logout sope.
|
|
43
|
+
*/
|
|
44
|
+
signOut(jwt: string, scope?: SignOutScope): Promise<{
|
|
45
|
+
data: null;
|
|
46
|
+
error: AuthError | null;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Sends an invite link to an email address.
|
|
50
|
+
* @param email The email address of the user.
|
|
51
|
+
* @param options Additional options to be included when inviting.
|
|
52
|
+
*/
|
|
53
|
+
inviteUserByEmail(email: string, options?: {
|
|
54
|
+
/** A custom data object to store additional metadata about the user. This maps to the `auth.users.user_metadata` column. */
|
|
55
|
+
data?: object;
|
|
56
|
+
/** The URL which will be appended to the email link sent to the user's email address. Once clicked the user will end up on this URL. */
|
|
57
|
+
redirectTo?: string;
|
|
58
|
+
}): Promise<UserResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Generates email links and OTPs to be sent via a custom email provider.
|
|
61
|
+
* @param email The user's email.
|
|
62
|
+
* @param options.password User password. For signup only.
|
|
63
|
+
* @param options.data Optional user metadata. For signup only.
|
|
64
|
+
* @param options.redirectTo The redirect url which should be appended to the generated link
|
|
65
|
+
*/
|
|
66
|
+
generateLink(params: GenerateLinkParams): Promise<GenerateLinkResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new user.
|
|
69
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
70
|
+
*/
|
|
71
|
+
createUser(attributes: AdminUserAttributes): Promise<UserResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Get a list of users.
|
|
74
|
+
*
|
|
75
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
76
|
+
* @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
|
|
77
|
+
*/
|
|
78
|
+
listUsers(params?: PageParams): Promise<{
|
|
79
|
+
data: {
|
|
80
|
+
users: User[];
|
|
81
|
+
aud: string;
|
|
82
|
+
} & Pagination;
|
|
83
|
+
error: null;
|
|
84
|
+
} | {
|
|
85
|
+
data: {
|
|
86
|
+
users: [];
|
|
87
|
+
};
|
|
88
|
+
error: AuthError;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* Get user by id.
|
|
92
|
+
*
|
|
93
|
+
* @param uid The user's unique identifier
|
|
94
|
+
*
|
|
95
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
96
|
+
*/
|
|
97
|
+
getUserById(uid: string): Promise<UserResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Updates the user data. Changes are applied directly without confirmation flows.
|
|
100
|
+
*
|
|
101
|
+
* @param uid The user's unique identifier
|
|
102
|
+
* @param attributes The data you want to update.
|
|
103
|
+
*
|
|
104
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* **Important:** This is a server-side operation and does **not** trigger client-side
|
|
108
|
+
* `onAuthStateChange` listeners. The admin API has no connection to client state.
|
|
109
|
+
*
|
|
110
|
+
* To sync changes to the client after calling this method:
|
|
111
|
+
* 1. On the client, call `supabase.auth.refreshSession()` to fetch the updated user data
|
|
112
|
+
* 2. This will trigger the `TOKEN_REFRESHED` event and notify all listeners
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* // Server-side (Edge Function)
|
|
117
|
+
* const { data, error } = await supabase.auth.admin.updateUserById(
|
|
118
|
+
* userId,
|
|
119
|
+
* { user_metadata: { preferences: { theme: 'dark' } } }
|
|
120
|
+
* )
|
|
121
|
+
*
|
|
122
|
+
* // Client-side (to sync the changes)
|
|
123
|
+
* const { data, error } = await supabase.auth.refreshSession()
|
|
124
|
+
* // onAuthStateChange listeners will now be notified with updated user
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @see {@link GoTrueClient.refreshSession} for syncing admin changes to the client
|
|
128
|
+
* @see {@link GoTrueClient.updateUser} for client-side user updates (triggers listeners automatically)
|
|
129
|
+
*/
|
|
130
|
+
updateUserById(uid: string, attributes: AdminUserAttributes): Promise<UserResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Delete a user. Requires a `service_role` key.
|
|
133
|
+
*
|
|
134
|
+
* @param id The user id you want to remove.
|
|
135
|
+
* @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
|
|
136
|
+
* Defaults to false for backward compatibility.
|
|
137
|
+
*
|
|
138
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
139
|
+
*/
|
|
140
|
+
deleteUser(id: string, shouldSoftDelete?: boolean): Promise<UserResponse>;
|
|
141
|
+
private _listFactors;
|
|
142
|
+
private _deleteFactor;
|
|
143
|
+
/**
|
|
144
|
+
* Lists all OAuth clients with optional pagination.
|
|
145
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
146
|
+
*
|
|
147
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
148
|
+
*/
|
|
149
|
+
private _listOAuthClients;
|
|
150
|
+
/**
|
|
151
|
+
* Creates a new OAuth client.
|
|
152
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
153
|
+
*
|
|
154
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
155
|
+
*/
|
|
156
|
+
private _createOAuthClient;
|
|
157
|
+
/**
|
|
158
|
+
* Gets details of a specific OAuth client.
|
|
159
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
160
|
+
*
|
|
161
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
162
|
+
*/
|
|
163
|
+
private _getOAuthClient;
|
|
164
|
+
/**
|
|
165
|
+
* Updates an existing OAuth client.
|
|
166
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
167
|
+
*
|
|
168
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
169
|
+
*/
|
|
170
|
+
private _updateOAuthClient;
|
|
171
|
+
/**
|
|
172
|
+
* Deletes an OAuth client.
|
|
173
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
174
|
+
*
|
|
175
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
176
|
+
*/
|
|
177
|
+
private _deleteOAuthClient;
|
|
178
|
+
/**
|
|
179
|
+
* Regenerates the secret for an OAuth client.
|
|
180
|
+
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
181
|
+
*
|
|
182
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
183
|
+
*/
|
|
184
|
+
private _regenerateOAuthClientSecret;
|
|
185
|
+
/**
|
|
186
|
+
* Lists all custom providers with optional type filter.
|
|
187
|
+
*
|
|
188
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
189
|
+
*/
|
|
190
|
+
private _listCustomProviders;
|
|
191
|
+
/**
|
|
192
|
+
* Creates a new custom OIDC/OAuth provider.
|
|
193
|
+
*
|
|
194
|
+
* For OIDC providers, the server fetches and validates the OpenID Connect discovery document
|
|
195
|
+
* from the issuer's well-known endpoint (or the provided `discovery_url`) at creation time.
|
|
196
|
+
* This may return a validation error (`error_code: "validation_failed"`) if the discovery
|
|
197
|
+
* document is unreachable, not valid JSON, missing required fields, or if the issuer
|
|
198
|
+
* in the document does not match the expected issuer.
|
|
199
|
+
*
|
|
200
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
201
|
+
*/
|
|
202
|
+
private _createCustomProvider;
|
|
203
|
+
/**
|
|
204
|
+
* Gets details of a specific custom provider by identifier.
|
|
205
|
+
*
|
|
206
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
207
|
+
*/
|
|
208
|
+
private _getCustomProvider;
|
|
209
|
+
/**
|
|
210
|
+
* Updates an existing custom provider.
|
|
211
|
+
*
|
|
212
|
+
* When `issuer` or `discovery_url` is changed on an OIDC provider, the server re-fetches and
|
|
213
|
+
* validates the discovery document before persisting. This may return a validation error
|
|
214
|
+
* (`error_code: "validation_failed"`) if the discovery document is unreachable, invalid, or
|
|
215
|
+
* the issuer does not match.
|
|
216
|
+
*
|
|
217
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
218
|
+
*/
|
|
219
|
+
private _updateCustomProvider;
|
|
220
|
+
/**
|
|
221
|
+
* Deletes a custom provider.
|
|
222
|
+
*
|
|
223
|
+
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
224
|
+
*/
|
|
225
|
+
private _deleteCustomProvider;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=GoTrueAdminApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoTrueAdminApi.d.ts","sourceRoot":"","sources":["../../src/GoTrueAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,iBAAiB,EAKjB,UAAU,EAEV,YAAY,EACZ,mBAAmB,EAKnB,6BAA6B,EAM9B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAA;AAErD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,+CAA+C;IAC/C,GAAG,EAAE,iBAAiB,CAAA;IAEtB;;;OAGG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B,sEAAsE;IACtE,eAAe,EAAE,6BAA6B,CAAA;IAE9C,SAAS,CAAC,GAAG,EAAE,MAAM,CAAA;IACrB,SAAS,CAA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