@supabase/gotrue-js 1.23.0-next.18 → 1.23.0-next.20

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.
Files changed (56) hide show
  1. package/dist/main/GoTrueAdminApi.d.ts +105 -0
  2. package/dist/main/GoTrueAdminApi.d.ts.map +1 -0
  3. package/dist/main/GoTrueAdminApi.js +216 -0
  4. package/dist/main/GoTrueAdminApi.js.map +1 -0
  5. package/dist/main/GoTrueClient.d.ts +61 -51
  6. package/dist/main/GoTrueClient.d.ts.map +1 -1
  7. package/dist/main/GoTrueClient.js +183 -134
  8. package/dist/main/GoTrueClient.js.map +1 -1
  9. package/dist/main/index.d.ts +2 -2
  10. package/dist/main/index.d.ts.map +1 -1
  11. package/dist/main/index.js +3 -3
  12. package/dist/main/index.js.map +1 -1
  13. package/dist/main/lib/fetch.d.ts +17 -4
  14. package/dist/main/lib/fetch.d.ts.map +1 -1
  15. package/dist/main/lib/fetch.js +41 -23
  16. package/dist/main/lib/fetch.js.map +1 -1
  17. package/dist/main/lib/types.d.ts +13 -2
  18. package/dist/main/lib/types.d.ts.map +1 -1
  19. package/dist/main/lib/version.d.ts +1 -1
  20. package/dist/main/lib/version.js +1 -1
  21. package/dist/module/GoTrueAdminApi.d.ts +105 -0
  22. package/dist/module/GoTrueAdminApi.d.ts.map +1 -0
  23. package/dist/module/GoTrueAdminApi.js +213 -0
  24. package/dist/module/GoTrueAdminApi.js.map +1 -0
  25. package/dist/module/GoTrueClient.d.ts +61 -51
  26. package/dist/module/GoTrueClient.d.ts.map +1 -1
  27. package/dist/module/GoTrueClient.js +184 -135
  28. package/dist/module/GoTrueClient.js.map +1 -1
  29. package/dist/module/index.d.ts +2 -2
  30. package/dist/module/index.d.ts.map +1 -1
  31. package/dist/module/index.js +2 -2
  32. package/dist/module/index.js.map +1 -1
  33. package/dist/module/lib/fetch.d.ts +17 -4
  34. package/dist/module/lib/fetch.d.ts.map +1 -1
  35. package/dist/module/lib/fetch.js +37 -18
  36. package/dist/module/lib/fetch.js.map +1 -1
  37. package/dist/module/lib/types.d.ts +13 -2
  38. package/dist/module/lib/types.d.ts.map +1 -1
  39. package/dist/module/lib/version.d.ts +1 -1
  40. package/dist/module/lib/version.js +1 -1
  41. package/package.json +1 -1
  42. package/src/GoTrueAdminApi.ts +242 -0
  43. package/src/GoTrueClient.ts +219 -193
  44. package/src/index.ts +2 -2
  45. package/src/lib/fetch.ts +57 -34
  46. package/src/lib/types.ts +17 -2
  47. package/src/lib/version.ts +1 -1
  48. package/dist/main/GoTrueApi.d.ts +0 -369
  49. package/dist/main/GoTrueApi.d.ts.map +0 -1
  50. package/dist/main/GoTrueApi.js +0 -582
  51. package/dist/main/GoTrueApi.js.map +0 -1
  52. package/dist/module/GoTrueApi.d.ts +0 -369
  53. package/dist/module/GoTrueApi.d.ts.map +0 -1
  54. package/dist/module/GoTrueApi.js +0 -579
  55. package/dist/module/GoTrueApi.js.map +0 -1
  56. package/src/GoTrueApi.ts +0 -866
@@ -0,0 +1,105 @@
1
+ import { Fetch } from './lib/fetch';
2
+ import { AdminUserAttributes, Session, User, UserResponse } from './lib/types';
3
+ import { AuthError } from './lib/errors';
4
+ export default class GoTrueAdminApi {
5
+ protected url: string;
6
+ protected headers: {
7
+ [key: string]: string;
8
+ };
9
+ protected fetch: Fetch;
10
+ constructor({ url, headers, fetch, }: {
11
+ url: string;
12
+ headers?: {
13
+ [key: string]: string;
14
+ };
15
+ fetch?: Fetch;
16
+ });
17
+ /**
18
+ * Removes a logged-in session.
19
+ * @param jwt A valid, logged-in JWT.
20
+ */
21
+ signOut(jwt: string): Promise<{
22
+ error: AuthError | null;
23
+ }>;
24
+ /**
25
+ * Sends an invite link to an email address.
26
+ * @param email The email address of the user.
27
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
28
+ * @param options.data Optional user metadata
29
+ */
30
+ inviteUserByEmail(email: string, options?: {
31
+ redirectTo?: string;
32
+ data?: object;
33
+ }): Promise<UserResponse>;
34
+ /**
35
+ * Generates links to be sent via email or other.
36
+ * @param type The link type ("signup" or "magiclink" or "recovery" or "invite").
37
+ * @param email The user's email.
38
+ * @param options.password User password. For signup only.
39
+ * @param options.data Optional user metadata. For signup only.
40
+ * @param options.redirectTo The link type ("signup" or "magiclink" or "recovery" or "invite").
41
+ */
42
+ generateLink(type: 'signup' | 'magiclink' | 'recovery' | 'invite' | 'email_change_current' | 'email_change_new', email: string, options?: {
43
+ password?: string;
44
+ data?: object;
45
+ redirectTo?: string;
46
+ }): Promise<{
47
+ data: User;
48
+ error: null;
49
+ } | {
50
+ data: Session;
51
+ error: null;
52
+ } | {
53
+ data: null;
54
+ error: AuthError;
55
+ }>;
56
+ /**
57
+ * Creates a new user.
58
+ *
59
+ * @param attributes The data you want to create the user with.
60
+ *
61
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
62
+ */
63
+ createUser(attributes: AdminUserAttributes): Promise<UserResponse>;
64
+ /**
65
+ * Get a list of users.
66
+ *
67
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
68
+ */
69
+ listUsers(): Promise<{
70
+ data: {
71
+ users: User[];
72
+ };
73
+ error: null;
74
+ } | {
75
+ data: {
76
+ users: [];
77
+ };
78
+ error: AuthError;
79
+ }>;
80
+ /**
81
+ * Get user by id.
82
+ *
83
+ * @param uid The user's unique identifier
84
+ *
85
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
86
+ */
87
+ getUserById(uid: string): Promise<UserResponse>;
88
+ /**
89
+ * Updates the user data.
90
+ *
91
+ * @param attributes The data you want to update.
92
+ *
93
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
94
+ */
95
+ updateUserById(uid: string, attributes: AdminUserAttributes): Promise<UserResponse>;
96
+ /**
97
+ * Delete a user. Requires a `service_role` key.
98
+ *
99
+ * @param uid The user uid you want to remove.
100
+ *
101
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
102
+ */
103
+ deleteUser(uid: string): Promise<UserResponse>;
104
+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AM,CAAA;QACjB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,UAAU,CAAC,EAAE,MAAM,CAAA;KACf,GACL,OAAO,CACN;QACE,IAAI,EAAE,IAAI,CAAA;QACV,KAAK,EAAE,IAAI,CAAA;KACZ,GACD;QACE,IAAI,EAAE,OAAO,CAAA;QACb,KAAK,EAAE,IAAI,CAAA;KACZ,GACD;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CACnC;IAqBD;;;;;;OAMG;IACG,UAAU,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAgBxE;;;;OAIG;IACG,SAAS,IAAI,OAAO,CACxB;QAAE,IAAI,EAAE;YAAE,KAAK,EAAE,IAAI,EAAE,CAAA;SAAE,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE;YAAE,KAAK,EAAE,EAAE,CAAA;SAAE,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CACrF;IAeD;;;;;;OAMG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAerD;;;;;;OAMG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAgBzF;;;;;;OAMG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAcrD"}
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fetch_1 = require("./lib/fetch");
13
+ const helpers_1 = require("./lib/helpers");
14
+ const errors_1 = require("./lib/errors");
15
+ class GoTrueAdminApi {
16
+ constructor({ url = '', headers = {}, fetch, }) {
17
+ this.url = url;
18
+ this.headers = headers;
19
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
20
+ }
21
+ /**
22
+ * Removes a logged-in session.
23
+ * @param jwt A valid, logged-in JWT.
24
+ */
25
+ signOut(jwt) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ try {
28
+ yield (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/logout`, {
29
+ jwt,
30
+ noResolveJson: true,
31
+ });
32
+ return { error: null };
33
+ }
34
+ catch (error) {
35
+ if ((0, errors_1.isAuthError)(error)) {
36
+ return { error };
37
+ }
38
+ throw error;
39
+ }
40
+ });
41
+ }
42
+ /**
43
+ * Sends an invite link to an email address.
44
+ * @param email The email address of the user.
45
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
46
+ * @param options.data Optional user metadata
47
+ */
48
+ inviteUserByEmail(email, options = {}) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ try {
51
+ return yield (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/invite`, {
52
+ body: { email, data: options.data },
53
+ headers: this.headers,
54
+ redirectTo: options.redirectTo,
55
+ xform: fetch_1._userResponse,
56
+ });
57
+ }
58
+ catch (error) {
59
+ if ((0, errors_1.isAuthError)(error)) {
60
+ return { data: { user: null }, error };
61
+ }
62
+ throw error;
63
+ }
64
+ });
65
+ }
66
+ /**
67
+ * Generates links to be sent via email or other.
68
+ * @param type The link type ("signup" or "magiclink" or "recovery" or "invite").
69
+ * @param email The user's email.
70
+ * @param options.password User password. For signup only.
71
+ * @param options.data Optional user metadata. For signup only.
72
+ * @param options.redirectTo The link type ("signup" or "magiclink" or "recovery" or "invite").
73
+ */
74
+ generateLink(type, email, options = {}) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ try {
77
+ return yield (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
78
+ body: {
79
+ type,
80
+ email,
81
+ password: options.password,
82
+ data: options.data,
83
+ redirect_to: options.redirectTo,
84
+ },
85
+ headers: this.headers,
86
+ });
87
+ }
88
+ catch (error) {
89
+ if ((0, errors_1.isAuthError)(error)) {
90
+ return { data: null, error };
91
+ }
92
+ throw error;
93
+ }
94
+ });
95
+ }
96
+ // User Admin API
97
+ /**
98
+ * Creates a new user.
99
+ *
100
+ * @param attributes The data you want to create the user with.
101
+ *
102
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
103
+ */
104
+ createUser(attributes) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ try {
107
+ return yield (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/users`, {
108
+ body: attributes,
109
+ headers: this.headers,
110
+ xform: fetch_1._userResponse,
111
+ });
112
+ }
113
+ catch (error) {
114
+ if ((0, errors_1.isAuthError)(error)) {
115
+ return { data: { user: null }, error };
116
+ }
117
+ throw error;
118
+ }
119
+ });
120
+ }
121
+ /**
122
+ * Get a list of users.
123
+ *
124
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
125
+ */
126
+ listUsers() {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ try {
129
+ const { data, error } = yield (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users`, {
130
+ headers: this.headers,
131
+ });
132
+ if (error)
133
+ throw error;
134
+ return { data: Object.assign({}, data), error: null };
135
+ }
136
+ catch (error) {
137
+ if ((0, errors_1.isAuthError)(error)) {
138
+ return { data: { users: [] }, error };
139
+ }
140
+ throw error;
141
+ }
142
+ });
143
+ }
144
+ /**
145
+ * Get user by id.
146
+ *
147
+ * @param uid The user's unique identifier
148
+ *
149
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
150
+ */
151
+ getUserById(uid) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ try {
154
+ return yield (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
155
+ headers: this.headers,
156
+ xform: fetch_1._userResponse,
157
+ });
158
+ }
159
+ catch (error) {
160
+ if ((0, errors_1.isAuthError)(error)) {
161
+ return { data: { user: null }, error };
162
+ }
163
+ throw error;
164
+ }
165
+ });
166
+ }
167
+ /**
168
+ * Updates the user data.
169
+ *
170
+ * @param attributes The data you want to update.
171
+ *
172
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
173
+ */
174
+ updateUserById(uid, attributes) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ try {
177
+ return yield (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
178
+ body: attributes,
179
+ headers: this.headers,
180
+ xform: fetch_1._userResponse,
181
+ });
182
+ }
183
+ catch (error) {
184
+ if ((0, errors_1.isAuthError)(error)) {
185
+ return { data: { user: null }, error };
186
+ }
187
+ throw error;
188
+ }
189
+ });
190
+ }
191
+ /**
192
+ * Delete a user. Requires a `service_role` key.
193
+ *
194
+ * @param uid The user uid you want to remove.
195
+ *
196
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
197
+ */
198
+ deleteUser(uid) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ try {
201
+ return yield (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${uid}`, {
202
+ headers: this.headers,
203
+ xform: fetch_1._userResponse,
204
+ });
205
+ }
206
+ catch (error) {
207
+ if ((0, errors_1.isAuthError)(error)) {
208
+ return { data: { user: null }, error };
209
+ }
210
+ throw error;
211
+ }
212
+ });
213
+ }
214
+ }
215
+ exports.default = GoTrueAdminApi;
216
+ //# sourceMappingURL=GoTrueAdminApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoTrueAdminApi.js","s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AAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,gBAAgB,GAAG,EAAE,EAAE;oBACzE,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,KAAK,EAAE,qBAAa;iBACrB,CAAC,CAAA;aACH;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE;oBACtB,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAA;iBACvC;gBAED,MAAM,KAAK,CAAA;aACZ;QACH,CAAC;KAAA;IAED;;;;;;OAMG;IACG,UAAU,CAAC,GAAW;;YAC1B,IAAI;gBACF,OAAO,MAAM,IAAA,gBAAQ,EAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,gBAAgB,GAAG,EAAE,EAAE;oBAC5E,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,KAAK,EAAE,qBAAa;iBACrB,CAAC,CAAA;aACH;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE;oBACtB,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAA;iBACvC;gBAED,MAAM,KAAK,CAAA;aACZ;QACH,CAAC;KAAA;CACF;AA5OD,iCA4OC"}
@@ -1,14 +1,15 @@
1
- import GoTrueApi from './GoTrueApi';
1
+ import GoTrueAdminApi from './GoTrueAdminApi';
2
2
  import { AuthError } from './lib/errors';
3
3
  import { Fetch } from './lib/fetch';
4
4
  import { Deferred } from './lib/helpers';
5
- import type { AuthChangeEvent, AuthResponse, CallRefreshTokenResult, OAuthResponse, Session, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, Subscription, SupportedStorage, User, UserAttributes, UserCredentials, VerifyOTPParams } from './lib/types';
5
+ import type { AuthChangeEvent, AuthResponse, CallRefreshTokenResult, OAuthResponse, Session, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, Subscription, SupportedStorage, UserAttributes, UserCredentials, UserResponse, VerifyOTPParams } from './lib/types';
6
6
  export default class GoTrueClient {
7
7
  /**
8
- * Namespace for the GoTrue API methods.
9
- * These can be used for example to get a user from a JWT in a server environment or reset a user's password.
8
+ * Namespace for the GoTrue admin methods.
9
+ * These methods should only be used in a trusted server-side environment.
10
+ * These methods
10
11
  */
11
- api: GoTrueApi;
12
+ admin: GoTrueAdminApi;
12
13
  /**
13
14
  * The storage key used to identity the values saved in localStorage
14
15
  */
@@ -25,6 +26,11 @@ export default class GoTrueClient {
25
26
  protected refreshTokenTimer?: ReturnType<typeof setTimeout>;
26
27
  protected networkRetries: number;
27
28
  protected refreshingDeferred: Deferred<CallRefreshTokenResult> | null;
29
+ protected url: string;
30
+ protected headers: {
31
+ [key: string]: string;
32
+ };
33
+ protected fetch: Fetch;
28
34
  /**
29
35
  * Create a new client for use in the browser.
30
36
  * @param options.url The URL of the GoTrue server.
@@ -58,6 +64,10 @@ export default class GoTrueClient {
58
64
  * @param phone The user's phone number.
59
65
  * @param options.redirectTo The redirect URL attached to the signup confirmation link. Does not redirect the user if it's a mobile signup.
60
66
  * @param options.data Optional user metadata.
67
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
68
+ *
69
+ * @returns A logged-in session if the server has "autoconfirm" ON
70
+ * @returns A user if the server has "autoconfirm" OFF
61
71
  */
62
72
  signUp({ email, password, phone }: UserCredentials, options?: {
63
73
  redirectTo?: string;
@@ -70,7 +80,7 @@ export default class GoTrueClient {
70
80
  * @param email The user's email address.
71
81
  * @param phone The user's phone number.
72
82
  * @param password The user's password.
73
- * @param options Valid options for password sign-ins.
83
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
74
84
  */
75
85
  signInWithPassword(credentials: SignInWithPasswordCredentials): Promise<AuthResponse>;
76
86
  /**
@@ -78,8 +88,9 @@ export default class GoTrueClient {
78
88
  * @type SignInWithOAuthCredentials
79
89
  * @param provider One of the providers supported by GoTrue.
80
90
  * @param redirectTo A URL to send the user to after they are confirmed (OAuth logins only).
81
- * @param scopes A space-separated list of scopes granted to the OAuth application.
82
- * @param queryParams An object of query params
91
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
92
+ * @param options.queryParams An object of query params
93
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
83
94
  */
84
95
  signInWithOAuth(credentials: SignInWithOAuthCredentials): Promise<OAuthResponse>;
85
96
  /**
@@ -87,7 +98,9 @@ export default class GoTrueClient {
87
98
  * @type SignInWithPasswordlessCredentials
88
99
  * @param email The user's email address.
89
100
  * @param phone The user's phone number.
90
- * @param options Valid options for passwordless sign-ins.
101
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
102
+ * @param options.emailRedirectTo The redirect url sent in the magiclink. The url will be appended to the end of the magiclink url. Does not serve to redirect the user after this method is invoked.
103
+ * @param options.shouldCreateUser If set to false, signInWithOtp will not create a new user if the user does not exist. Defaults to true.
91
104
  */
92
105
  signInWithOtp(credentials: SignInWithPasswordlessCredentials): Promise<AuthResponse>;
93
106
  /**
@@ -96,10 +109,12 @@ export default class GoTrueClient {
96
109
  * @param phone The user's phone number.
97
110
  * @param token The user's password.
98
111
  * @param type The user's verification type.
99
- * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
112
+ * @param options.redirectTo A URL to send the user to after they are confirmed.
113
+ * @param options.captchaToken An optional captcha verification token.
100
114
  */
101
115
  verifyOTP(params: VerifyOTPParams, options?: {
102
116
  redirectTo?: string;
117
+ captchaToken?: string;
103
118
  }): Promise<AuthResponse>;
104
119
  /**
105
120
  * Returns the session data, refreshing it if necessary.
@@ -115,55 +130,24 @@ export default class GoTrueClient {
115
130
  error: null;
116
131
  }>;
117
132
  /**
118
- * Returns the user data, refreshing the session if necessary.
133
+ * Gets the current user details if there is an existing session.
119
134
  */
120
- getUser(): Promise<{
121
- user: User;
122
- error: null;
123
- } | {
124
- user: null;
125
- error: AuthError;
126
- } | {
127
- user: null;
128
- error: null;
129
- }>;
135
+ getUser(): Promise<UserResponse>;
130
136
  /**
131
137
  * Updates user data, if there is a logged in user.
138
+ * @param attributes The data you want to update.
132
139
  */
133
- update(attributes: UserAttributes): Promise<{
134
- user: User;
135
- error: null;
136
- } | {
137
- user: null;
138
- error: AuthError;
139
- }>;
140
+ updateUser(attributes: UserAttributes): Promise<UserResponse>;
140
141
  /**
141
142
  * Sets the session data from refresh_token and returns current Session and Error
142
143
  * @param refresh_token a JWT token
143
144
  */
144
- setSession(refresh_token: string): Promise<{
145
- session: Session;
146
- error: null;
147
- } | {
148
- session: null;
149
- error: null;
150
- } | {
151
- session: null;
152
- error: AuthError;
153
- }>;
145
+ setSession(refresh_token: string): Promise<AuthResponse>;
154
146
  /**
155
147
  * Gets the session data from a URL string
156
- * @param options.storeSession Optionally store the session in the browser
148
+ * @param options.storeSession Optionally store the session in the browser or in-memory
157
149
  */
158
- getSessionFromUrl(options?: {
159
- storeSession?: boolean;
160
- }): Promise<{
161
- session: Session;
162
- error: null;
163
- } | {
164
- session: null;
165
- error: AuthError;
166
- }>;
150
+ private _getSessionFromUrl;
167
151
  /**
168
152
  * Inside a browser context, `signOut()` will remove the logged in user from the browser session
169
153
  * and log them out - removing all items from localstorage and then trigger a "SIGNED_OUT" event.
@@ -184,11 +168,29 @@ export default class GoTrueClient {
184
168
  subscription: null;
185
169
  error: AuthError;
186
170
  };
171
+ /**
172
+ * Sends a reset request to an email address.
173
+ * @param email The email address of the user.
174
+ * @param options.redirectTo A URL to send the user to after they are confirmed.
175
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
176
+ */
177
+ resetPasswordForEmail(email: string, options?: {
178
+ redirectTo?: string;
179
+ captchaToken?: string;
180
+ }): Promise<{
181
+ data: {};
182
+ error: null;
183
+ } | {
184
+ data: null;
185
+ error: AuthError;
186
+ }>;
187
+ /**
188
+ * Generates a new JWT.
189
+ * @param refreshToken A valid refresh token that was returned on login.
190
+ */
191
+ private _refreshAccessToken;
187
192
  private _doesSessionExist;
188
- private _handleEmailSignIn;
189
- private _handlePhoneSignIn;
190
193
  private _handleProviderSignIn;
191
- private _handleOpenIDConnectSignIn;
192
194
  /**
193
195
  * Recovers the session from LocalStorage and refreshes
194
196
  * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
@@ -209,5 +211,13 @@ export default class GoTrueClient {
209
211
  */
210
212
  private _startAutoRefreshToken;
211
213
  private _handleVisibilityChange;
214
+ /**
215
+ * Generates the relevant login URL for a third-party provider.
216
+ * @param provider One of the providers supported by GoTrue.
217
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
218
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
219
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
220
+ */
221
+ private _getUrlForProvider;
212
222
  }
213
223
  //# sourceMappingURL=GoTrueClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GoTrueClient.d.ts","sourceRoot":"","sources":["../../src/GoTrueClient.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AAQnC,OAAO,EAEL,SAAS,EAMV,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EACL,QAAQ,EAOT,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,aAAa,EAGb,OAAO,EACP,0BAA0B,EAC1B,6BAA6B,EAC7B,iCAAiC,EACjC,YAAY,EACZ,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,eAAe,EACf,eAAe,EAChB,MAAM,aAAa,CAAA;AAcpB,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B;;;OAGG;IACH,GAAG,EAAE,SAAS,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,UAAU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