@multiplatform.one/keycloak 6.1.0 → 6.4.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.
Files changed (78) hide show
  1. package/README.md +58 -0
  2. package/dist/cjs/index.cjs +28 -1
  3. package/dist/cjs/index.native.cjs +36 -5
  4. package/dist/esm/index.js +28 -1
  5. package/dist/esm/index.native.js +36 -5
  6. package/package.json +18 -16
  7. package/src/betterAuth/expoAuthFlow.native.ts +56 -5
  8. package/src/frappeToken.ts +81 -4
  9. package/types/Authenticated.d.ts +9 -0
  10. package/types/Authenticated.d.ts.map +1 -0
  11. package/types/Loading.d.ts +6 -0
  12. package/types/Loading.d.ts.map +1 -0
  13. package/types/authConfig.d.ts +10 -0
  14. package/types/authConfig.d.ts.map +1 -0
  15. package/types/betterAuth/client.d.ts +798 -0
  16. package/types/betterAuth/client.d.ts.map +1 -0
  17. package/types/betterAuth/expoAuthFlow.native.d.ts +31 -0
  18. package/types/betterAuth/expoAuthFlow.native.d.ts.map +1 -0
  19. package/types/betterAuth/expoClient.d.ts +803 -0
  20. package/types/betterAuth/expoClient.d.ts.map +1 -0
  21. package/types/betterAuth/index.d.ts +3 -0
  22. package/types/betterAuth/index.d.ts.map +1 -0
  23. package/types/frappeToken.d.ts +19 -0
  24. package/types/frappeToken.d.ts.map +1 -0
  25. package/types/frappeToken.native.d.ts +15 -0
  26. package/types/frappeToken.native.d.ts.map +1 -0
  27. package/types/hooks/index.d.ts +4 -0
  28. package/types/hooks/index.d.ts.map +1 -0
  29. package/types/hooks/useAuthConfig.d.ts +2 -0
  30. package/types/hooks/useAuthConfig.d.ts.map +1 -0
  31. package/types/hooks/useTokensFromQuery/index.d.ts +2 -0
  32. package/types/hooks/useTokensFromQuery/index.d.ts.map +1 -0
  33. package/types/hooks/useTokensFromQuery/index.native.d.ts +2 -0
  34. package/types/hooks/useTokensFromQuery/index.native.d.ts.map +1 -0
  35. package/types/hooks/useTokensFromState.d.ts +2 -0
  36. package/types/hooks/useTokensFromState.d.ts.map +1 -0
  37. package/types/index.d.ts +10 -0
  38. package/types/index.d.ts.map +1 -0
  39. package/types/keycloak/base.d.ts +50 -0
  40. package/types/keycloak/base.d.ts.map +1 -0
  41. package/types/keycloak/config.d.ts +12 -0
  42. package/types/keycloak/config.d.ts.map +1 -0
  43. package/types/keycloak/context.d.ts +3 -0
  44. package/types/keycloak/context.d.ts.map +1 -0
  45. package/types/keycloak/index.d.ts +20 -0
  46. package/types/keycloak/index.d.ts.map +1 -0
  47. package/types/keycloak/index.native.d.ts +7 -0
  48. package/types/keycloak/index.native.d.ts.map +1 -0
  49. package/types/keycloak/index.webext.d.ts +19 -0
  50. package/types/keycloak/index.webext.d.ts.map +1 -0
  51. package/types/one.d.ts +28 -0
  52. package/types/one.d.ts.map +1 -0
  53. package/types/provider/AfterAuth.d.ts +6 -0
  54. package/types/provider/AfterAuth.d.ts.map +1 -0
  55. package/types/provider/KeycloakProvider.d.ts +17 -0
  56. package/types/provider/KeycloakProvider.d.ts.map +1 -0
  57. package/types/provider/authProvider/index.d.ts +13 -0
  58. package/types/provider/authProvider/index.d.ts.map +1 -0
  59. package/types/provider/authProvider/index.native.d.ts +15 -0
  60. package/types/provider/authProvider/index.native.d.ts.map +1 -0
  61. package/types/provider/authProvider/index.webext.d.ts +14 -0
  62. package/types/provider/authProvider/index.webext.d.ts.map +1 -0
  63. package/types/provider/authProvider/shared.d.ts +38 -0
  64. package/types/provider/authProvider/shared.d.ts.map +1 -0
  65. package/types/provider/index.d.ts +4 -0
  66. package/types/provider/index.d.ts.map +1 -0
  67. package/types/session/index.d.ts +29 -0
  68. package/types/session/index.d.ts.map +1 -0
  69. package/types/session/index.native.d.ts +13 -0
  70. package/types/session/index.native.d.ts.map +1 -0
  71. package/types/session/index.webext.d.ts +11 -0
  72. package/types/session/index.webext.d.ts.map +1 -0
  73. package/types/state.d.ts +18 -0
  74. package/types/state.d.ts.map +1 -0
  75. package/types/token.d.ts +129 -0
  76. package/types/token.d.ts.map +1 -0
  77. package/types/types.d.ts +19 -0
  78. package/types/types.d.ts.map +1 -0
@@ -0,0 +1,803 @@
1
+ /**
2
+ * Better Auth Expo client for native (React Native / Expo).
3
+ * Uses @better-auth/expo/client (expoClient plugin) and SecureStore.
4
+ * Wraps signIn.social for Keycloak; same session/useSession API.
5
+ */
6
+ /**
7
+ * Create or return the singleton Better Auth Expo client.
8
+ * @param baseURL — Better Auth server base URL (e.g. https://app.example.com)
9
+ * @param scheme — Expo deep link scheme (from app.json, e.g. "one" or "myapp")
10
+ */
11
+ export declare function getExpoAuthClient(baseURL: string, scheme?: string): {
12
+ refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
13
+ providerId: string;
14
+ accountId?: string | undefined;
15
+ userId?: string | undefined;
16
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
17
+ providerId: string;
18
+ accountId?: string | undefined;
19
+ userId?: string | undefined;
20
+ } & {
21
+ fetchOptions?: FetchOptions | undefined;
22
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
23
+ accessToken: string | undefined;
24
+ refreshToken: string;
25
+ accessTokenExpiresAt: Date | undefined;
26
+ refreshTokenExpiresAt: Date | null | undefined;
27
+ scope: string | null | undefined;
28
+ idToken: string | null | undefined;
29
+ providerId: string;
30
+ accountId: string;
31
+ }, {
32
+ code?: string | undefined;
33
+ message?: string | undefined;
34
+ }, FetchOptions["throw"] extends true ? true : false>>;
35
+ } & {
36
+ signIn: {
37
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
38
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
39
+ callbackURL?: string | undefined;
40
+ newUserCallbackURL?: string | undefined;
41
+ errorCallbackURL?: string | undefined;
42
+ disableRedirect?: boolean | undefined;
43
+ idToken?: {
44
+ token: string;
45
+ nonce?: string | undefined;
46
+ accessToken?: string | undefined;
47
+ refreshToken?: string | undefined;
48
+ expiresAt?: number | undefined;
49
+ user?: {
50
+ name?: {
51
+ firstName?: string | undefined;
52
+ lastName?: string | undefined;
53
+ } | undefined;
54
+ email?: string | undefined;
55
+ } | undefined;
56
+ } | undefined;
57
+ scopes?: string[] | undefined;
58
+ requestSignUp?: boolean | undefined;
59
+ loginHint?: string | undefined;
60
+ additionalData?: Record<string, any> | undefined;
61
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
62
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
63
+ callbackURL?: string | undefined;
64
+ newUserCallbackURL?: string | undefined;
65
+ errorCallbackURL?: string | undefined;
66
+ disableRedirect?: boolean | undefined;
67
+ idToken?: {
68
+ token: string;
69
+ nonce?: string | undefined;
70
+ accessToken?: string | undefined;
71
+ refreshToken?: string | undefined;
72
+ expiresAt?: number | undefined;
73
+ user?: {
74
+ name?: {
75
+ firstName?: string | undefined;
76
+ lastName?: string | undefined;
77
+ } | undefined;
78
+ email?: string | undefined;
79
+ } | undefined;
80
+ } | undefined;
81
+ scopes?: string[] | undefined;
82
+ requestSignUp?: boolean | undefined;
83
+ loginHint?: string | undefined;
84
+ additionalData?: Record<string, any> | undefined;
85
+ } & {
86
+ fetchOptions?: FetchOptions | undefined;
87
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
88
+ redirect: boolean;
89
+ url: string;
90
+ } | (Omit<{
91
+ redirect: boolean;
92
+ token: string;
93
+ url: undefined;
94
+ user: {
95
+ id: string;
96
+ createdAt: Date;
97
+ updatedAt: Date;
98
+ email: string;
99
+ emailVerified: boolean;
100
+ name: string;
101
+ image?: string | null | undefined | undefined;
102
+ };
103
+ }, "user"> & {
104
+ user: import("better-auth").StripEmptyObjects<{
105
+ id: string;
106
+ createdAt: Date;
107
+ updatedAt: Date;
108
+ email: string;
109
+ emailVerified: boolean;
110
+ name: string;
111
+ image?: string | null | undefined;
112
+ }>;
113
+ }), {
114
+ code?: string | undefined;
115
+ message?: string | undefined;
116
+ }, FetchOptions["throw"] extends true ? true : false>>;
117
+ };
118
+ } & {
119
+ signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
120
+ query?: Record<string, any> | undefined;
121
+ fetchOptions?: FetchOptions | undefined;
122
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
123
+ success: boolean;
124
+ }, {
125
+ code?: string | undefined;
126
+ message?: string | undefined;
127
+ }, FetchOptions["throw"] extends true ? true : false>>;
128
+ } & {
129
+ signUp: {
130
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
131
+ name: string;
132
+ email: string;
133
+ password: string;
134
+ image?: string | undefined;
135
+ callbackURL?: string | undefined;
136
+ rememberMe?: boolean | undefined;
137
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
138
+ email: string;
139
+ name: string;
140
+ password: string;
141
+ image?: string | undefined;
142
+ callbackURL?: string | undefined;
143
+ fetchOptions?: FetchOptions | undefined;
144
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
145
+ token: null;
146
+ user: {
147
+ id: string;
148
+ createdAt: Date;
149
+ updatedAt: Date;
150
+ email: string;
151
+ emailVerified: boolean;
152
+ name: string;
153
+ image?: string | null | undefined | undefined;
154
+ };
155
+ }, "user"> & {
156
+ user: import("better-auth").StripEmptyObjects<{
157
+ id: string;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ email: string;
161
+ emailVerified: boolean;
162
+ name: string;
163
+ image?: string | null | undefined;
164
+ }>;
165
+ }) | (Omit<{
166
+ token: string;
167
+ user: {
168
+ id: string;
169
+ createdAt: Date;
170
+ updatedAt: Date;
171
+ email: string;
172
+ emailVerified: boolean;
173
+ name: string;
174
+ image?: string | null | undefined | undefined;
175
+ };
176
+ }, "user"> & {
177
+ user: import("better-auth").StripEmptyObjects<{
178
+ id: string;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ email: string;
182
+ emailVerified: boolean;
183
+ name: string;
184
+ image?: string | null | undefined;
185
+ }>;
186
+ }), {
187
+ code?: string | undefined;
188
+ message?: string | undefined;
189
+ }, FetchOptions["throw"] extends true ? true : false>>;
190
+ };
191
+ } & {
192
+ signIn: {
193
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
194
+ email: string;
195
+ password: string;
196
+ callbackURL?: string | undefined;
197
+ rememberMe?: boolean | undefined;
198
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
199
+ email: string;
200
+ password: string;
201
+ callbackURL?: string | undefined;
202
+ rememberMe?: boolean | undefined;
203
+ } & {
204
+ fetchOptions?: FetchOptions | undefined;
205
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
206
+ redirect: boolean;
207
+ token: string;
208
+ url?: string | undefined;
209
+ user: {
210
+ id: string;
211
+ createdAt: Date;
212
+ updatedAt: Date;
213
+ email: string;
214
+ emailVerified: boolean;
215
+ name: string;
216
+ image?: string | null | undefined | undefined;
217
+ };
218
+ }, "user"> & {
219
+ user: import("better-auth").StripEmptyObjects<{
220
+ id: string;
221
+ createdAt: Date;
222
+ updatedAt: Date;
223
+ email: string;
224
+ emailVerified: boolean;
225
+ name: string;
226
+ image?: string | null | undefined;
227
+ }>;
228
+ }, {
229
+ code?: string | undefined;
230
+ message?: string | undefined;
231
+ }, FetchOptions["throw"] extends true ? true : false>>;
232
+ };
233
+ } & {
234
+ resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
235
+ newPassword: string;
236
+ token?: string | undefined;
237
+ }> & Record<string, any>, Partial<{
238
+ token?: string | undefined;
239
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
240
+ newPassword: string;
241
+ token?: string | undefined;
242
+ } & {
243
+ fetchOptions?: FetchOptions | undefined;
244
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
245
+ status: boolean;
246
+ }, {
247
+ code?: string | undefined;
248
+ message?: string | undefined;
249
+ }, FetchOptions["throw"] extends true ? true : false>>;
250
+ } & {
251
+ verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
252
+ token: string;
253
+ callbackURL?: string | undefined;
254
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
255
+ query: {
256
+ token: string;
257
+ callbackURL?: string | undefined;
258
+ };
259
+ fetchOptions?: FetchOptions | undefined;
260
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
261
+ status: boolean;
262
+ }>, {
263
+ code?: string | undefined;
264
+ message?: string | undefined;
265
+ }, FetchOptions["throw"] extends true ? true : false>>;
266
+ } & {
267
+ sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
268
+ email: string;
269
+ callbackURL?: string | undefined;
270
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
271
+ email: string;
272
+ callbackURL?: string | undefined;
273
+ } & {
274
+ fetchOptions?: FetchOptions | undefined;
275
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
276
+ status: boolean;
277
+ }, {
278
+ code?: string | undefined;
279
+ message?: string | undefined;
280
+ }, FetchOptions["throw"] extends true ? true : false>>;
281
+ } & {
282
+ changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
283
+ newEmail: string;
284
+ callbackURL?: string | undefined;
285
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
286
+ newEmail: string;
287
+ callbackURL?: string | undefined;
288
+ } & {
289
+ fetchOptions?: FetchOptions | undefined;
290
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
291
+ status: boolean;
292
+ }, {
293
+ code?: string | undefined;
294
+ message?: string | undefined;
295
+ }, FetchOptions["throw"] extends true ? true : false>>;
296
+ } & {
297
+ changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
298
+ newPassword: string;
299
+ currentPassword: string;
300
+ revokeOtherSessions?: boolean | undefined;
301
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
302
+ newPassword: string;
303
+ currentPassword: string;
304
+ revokeOtherSessions?: boolean | undefined;
305
+ } & {
306
+ fetchOptions?: FetchOptions | undefined;
307
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
308
+ token: string | null;
309
+ user: {
310
+ id: string;
311
+ createdAt: Date;
312
+ updatedAt: Date;
313
+ email: string;
314
+ emailVerified: boolean;
315
+ name: string;
316
+ image?: string | null | undefined;
317
+ } & Record<string, any> & {
318
+ id: string;
319
+ createdAt: Date;
320
+ updatedAt: Date;
321
+ email: string;
322
+ emailVerified: boolean;
323
+ name: string;
324
+ image?: string | null | undefined;
325
+ };
326
+ }, "user"> & {
327
+ user: import("better-auth").StripEmptyObjects<{
328
+ id: string;
329
+ createdAt: Date;
330
+ updatedAt: Date;
331
+ email: string;
332
+ emailVerified: boolean;
333
+ name: string;
334
+ image?: string | null | undefined;
335
+ }>;
336
+ }, {
337
+ code?: string | undefined;
338
+ message?: string | undefined;
339
+ }, FetchOptions["throw"] extends true ? true : false>>;
340
+ } & {
341
+ updateSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<Partial<{}> & {
342
+ fetchOptions?: FetchOptions | undefined;
343
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
344
+ session: {
345
+ id: string;
346
+ createdAt: Date;
347
+ updatedAt: Date;
348
+ userId: string;
349
+ expiresAt: Date;
350
+ token: string;
351
+ ipAddress?: string | null | undefined;
352
+ userAgent?: string | null | undefined;
353
+ };
354
+ }, {
355
+ code?: string | undefined;
356
+ message?: string | undefined;
357
+ }, FetchOptions["throw"] extends true ? true : false>>;
358
+ } & {
359
+ updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
360
+ name?: string | undefined;
361
+ image?: string | undefined | null;
362
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<import("better-auth/client").InferUserUpdateCtx<import("better-auth").BetterAuthClientOptions, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
363
+ status: boolean;
364
+ }, {
365
+ code?: string | undefined;
366
+ message?: string | undefined;
367
+ }, FetchOptions["throw"] extends true ? true : false>>;
368
+ } & {
369
+ deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
370
+ callbackURL?: string | undefined;
371
+ password?: string | undefined;
372
+ token?: string | undefined;
373
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
374
+ callbackURL?: string | undefined;
375
+ password?: string | undefined;
376
+ token?: string | undefined;
377
+ } & {
378
+ fetchOptions?: FetchOptions | undefined;
379
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
380
+ success: boolean;
381
+ message: string;
382
+ }, {
383
+ code?: string | undefined;
384
+ message?: string | undefined;
385
+ }, FetchOptions["throw"] extends true ? true : false>>;
386
+ } & {
387
+ requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
388
+ email: string;
389
+ redirectTo?: string | undefined;
390
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
391
+ email: string;
392
+ redirectTo?: string | undefined;
393
+ } & {
394
+ fetchOptions?: FetchOptions | undefined;
395
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
396
+ status: boolean;
397
+ message: string;
398
+ }, {
399
+ code?: string | undefined;
400
+ message?: string | undefined;
401
+ }, FetchOptions["throw"] extends true ? true : false>>;
402
+ } & {
403
+ resetPassword: {
404
+ ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
405
+ callbackURL: string;
406
+ }> & Record<string, any>, {
407
+ token: string;
408
+ }>>(data_0: import("better-auth").Prettify<{
409
+ query: {
410
+ callbackURL: string;
411
+ };
412
+ fetchOptions?: FetchOptions | undefined;
413
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
414
+ code?: string | undefined;
415
+ message?: string | undefined;
416
+ }, FetchOptions["throw"] extends true ? true : false>>;
417
+ };
418
+ } & {
419
+ listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
420
+ query?: Record<string, any> | undefined;
421
+ fetchOptions?: FetchOptions | undefined;
422
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").Prettify<{
423
+ id: string;
424
+ createdAt: Date;
425
+ updatedAt: Date;
426
+ userId: string;
427
+ expiresAt: Date;
428
+ token: string;
429
+ ipAddress?: string | null | undefined | undefined;
430
+ userAgent?: string | null | undefined | undefined;
431
+ }>[], {
432
+ code?: string | undefined;
433
+ message?: string | undefined;
434
+ }, FetchOptions["throw"] extends true ? true : false>>;
435
+ } & {
436
+ revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
437
+ token: string;
438
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
439
+ token: string;
440
+ } & {
441
+ fetchOptions?: FetchOptions | undefined;
442
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
443
+ status: boolean;
444
+ }, {
445
+ code?: string | undefined;
446
+ message?: string | undefined;
447
+ }, FetchOptions["throw"] extends true ? true : false>>;
448
+ } & {
449
+ revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
450
+ query?: Record<string, any> | undefined;
451
+ fetchOptions?: FetchOptions | undefined;
452
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
453
+ status: boolean;
454
+ }, {
455
+ code?: string | undefined;
456
+ message?: string | undefined;
457
+ }, FetchOptions["throw"] extends true ? true : false>>;
458
+ } & {
459
+ revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
460
+ query?: Record<string, any> | undefined;
461
+ fetchOptions?: FetchOptions | undefined;
462
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
463
+ status: boolean;
464
+ }, {
465
+ code?: string | undefined;
466
+ message?: string | undefined;
467
+ }, FetchOptions["throw"] extends true ? true : false>>;
468
+ } & {
469
+ linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
470
+ provider: unknown;
471
+ callbackURL?: string | undefined;
472
+ idToken?: {
473
+ token: string;
474
+ nonce?: string | undefined;
475
+ accessToken?: string | undefined;
476
+ refreshToken?: string | undefined;
477
+ scopes?: string[] | undefined;
478
+ } | undefined;
479
+ requestSignUp?: boolean | undefined;
480
+ scopes?: string[] | undefined;
481
+ errorCallbackURL?: string | undefined;
482
+ disableRedirect?: boolean | undefined;
483
+ additionalData?: Record<string, any> | undefined;
484
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
485
+ provider: unknown;
486
+ callbackURL?: string | undefined;
487
+ idToken?: {
488
+ token: string;
489
+ nonce?: string | undefined;
490
+ accessToken?: string | undefined;
491
+ refreshToken?: string | undefined;
492
+ scopes?: string[] | undefined;
493
+ } | undefined;
494
+ requestSignUp?: boolean | undefined;
495
+ scopes?: string[] | undefined;
496
+ errorCallbackURL?: string | undefined;
497
+ disableRedirect?: boolean | undefined;
498
+ additionalData?: Record<string, any> | undefined;
499
+ } & {
500
+ fetchOptions?: FetchOptions | undefined;
501
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
502
+ url: string;
503
+ redirect: boolean;
504
+ }, {
505
+ code?: string | undefined;
506
+ message?: string | undefined;
507
+ }, FetchOptions["throw"] extends true ? true : false>>;
508
+ } & {
509
+ listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
510
+ query?: Record<string, any> | undefined;
511
+ fetchOptions?: FetchOptions | undefined;
512
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
513
+ scopes: string[];
514
+ id: string;
515
+ createdAt: Date;
516
+ updatedAt: Date;
517
+ userId: string;
518
+ providerId: string;
519
+ accountId: string;
520
+ }[], {
521
+ code?: string | undefined;
522
+ message?: string | undefined;
523
+ }, FetchOptions["throw"] extends true ? true : false>>;
524
+ } & {
525
+ deleteUser: {
526
+ callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
527
+ token: string;
528
+ callbackURL?: string | undefined;
529
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
530
+ query: {
531
+ token: string;
532
+ callbackURL?: string | undefined;
533
+ };
534
+ fetchOptions?: FetchOptions | undefined;
535
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
536
+ success: boolean;
537
+ message: string;
538
+ }, {
539
+ code?: string | undefined;
540
+ message?: string | undefined;
541
+ }, FetchOptions["throw"] extends true ? true : false>>;
542
+ };
543
+ } & {
544
+ unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
545
+ providerId: string;
546
+ accountId?: string | undefined;
547
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
548
+ providerId: string;
549
+ accountId?: string | undefined;
550
+ } & {
551
+ fetchOptions?: FetchOptions | undefined;
552
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
553
+ status: boolean;
554
+ }, {
555
+ code?: string | undefined;
556
+ message?: string | undefined;
557
+ }, FetchOptions["throw"] extends true ? true : false>>;
558
+ } & {
559
+ getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
560
+ providerId: string;
561
+ accountId?: string | undefined;
562
+ userId?: string | undefined;
563
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
564
+ providerId: string;
565
+ accountId?: string | undefined;
566
+ userId?: string | undefined;
567
+ } & {
568
+ fetchOptions?: FetchOptions | undefined;
569
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
570
+ accessToken: string;
571
+ accessTokenExpiresAt: Date | undefined;
572
+ scopes: string[];
573
+ idToken: string | undefined;
574
+ }, {
575
+ code?: string | undefined;
576
+ message?: string | undefined;
577
+ }, FetchOptions["throw"] extends true ? true : false>>;
578
+ } & {
579
+ accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
580
+ accountId?: string | undefined;
581
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
582
+ query?: {
583
+ accountId?: string | undefined;
584
+ } | undefined;
585
+ fetchOptions?: FetchOptions | undefined;
586
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
587
+ user: import("better-auth").OAuth2UserInfo;
588
+ data: Record<string, any>;
589
+ }, {
590
+ code?: string | undefined;
591
+ message?: string | undefined;
592
+ }, FetchOptions["throw"] extends true ? true : false>>;
593
+ } & {
594
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
595
+ disableCookieCache?: unknown;
596
+ disableRefresh?: unknown;
597
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
598
+ query?: {
599
+ disableCookieCache?: unknown;
600
+ disableRefresh?: unknown;
601
+ } | undefined;
602
+ fetchOptions?: FetchOptions | undefined;
603
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
604
+ user: import("better-auth").StripEmptyObjects<{
605
+ id: string;
606
+ createdAt: Date;
607
+ updatedAt: Date;
608
+ email: string;
609
+ emailVerified: boolean;
610
+ name: string;
611
+ image?: string | null | undefined;
612
+ }>;
613
+ session: import("better-auth").StripEmptyObjects<{
614
+ id: string;
615
+ createdAt: Date;
616
+ updatedAt: Date;
617
+ userId: string;
618
+ expiresAt: Date;
619
+ token: string;
620
+ ipAddress?: string | null | undefined;
621
+ userAgent?: string | null | undefined;
622
+ }>;
623
+ } | null, {
624
+ code?: string | undefined;
625
+ message?: string | undefined;
626
+ }, FetchOptions["throw"] extends true ? true : false>>;
627
+ } & {
628
+ useSession: () => {
629
+ data: {
630
+ user: import("better-auth").StripEmptyObjects<{
631
+ id: string;
632
+ createdAt: Date;
633
+ updatedAt: Date;
634
+ email: string;
635
+ emailVerified: boolean;
636
+ name: string;
637
+ image?: string | null | undefined;
638
+ }>;
639
+ session: import("better-auth").StripEmptyObjects<{
640
+ id: string;
641
+ createdAt: Date;
642
+ updatedAt: Date;
643
+ userId: string;
644
+ expiresAt: Date;
645
+ token: string;
646
+ ipAddress?: string | null | undefined;
647
+ userAgent?: string | null | undefined;
648
+ }>;
649
+ } | null;
650
+ isPending: boolean;
651
+ isRefetching: boolean;
652
+ error: import("@better-fetch/fetch").BetterFetchError | null;
653
+ refetch: (queryParams?: {
654
+ query?: import("better-auth").SessionQueryParams;
655
+ } | undefined) => Promise<void>;
656
+ };
657
+ $Infer: {
658
+ Session: {
659
+ user: import("better-auth").StripEmptyObjects<{
660
+ id: string;
661
+ createdAt: Date;
662
+ updatedAt: Date;
663
+ email: string;
664
+ emailVerified: boolean;
665
+ name: string;
666
+ image?: string | null | undefined;
667
+ }>;
668
+ session: import("better-auth").StripEmptyObjects<{
669
+ id: string;
670
+ createdAt: Date;
671
+ updatedAt: Date;
672
+ userId: string;
673
+ expiresAt: Date;
674
+ token: string;
675
+ ipAddress?: string | null | undefined;
676
+ userAgent?: string | null | undefined;
677
+ }>;
678
+ };
679
+ };
680
+ $fetch: import("@better-fetch/fetch").BetterFetch<{
681
+ plugins: (import("@better-fetch/fetch").BetterFetchPlugin<Record<string, any>> | {
682
+ id: string;
683
+ name: string;
684
+ hooks: {
685
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
686
+ };
687
+ } | {
688
+ id: string;
689
+ name: string;
690
+ hooks: {
691
+ onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
692
+ onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
693
+ onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
694
+ onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
695
+ };
696
+ })[];
697
+ priority?: RequestPriority | undefined;
698
+ cache?: RequestCache | undefined;
699
+ credentials?: RequestCredentials;
700
+ headers?: (HeadersInit & (HeadersInit | {
701
+ accept: "application/json" | "text/plain" | "application/octet-stream";
702
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
703
+ authorization: "Bearer" | "Basic";
704
+ })) | undefined;
705
+ integrity?: string | undefined;
706
+ keepalive?: boolean | undefined;
707
+ method: string;
708
+ mode?: RequestMode | undefined;
709
+ redirect?: RequestRedirect | undefined;
710
+ referrer?: string | undefined;
711
+ referrerPolicy?: ReferrerPolicy | undefined;
712
+ signal?: (AbortSignal | null) | undefined;
713
+ window?: null | undefined;
714
+ onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
715
+ hookOptions?: {
716
+ cloneResponse?: boolean;
717
+ } | undefined;
718
+ timeout?: number | undefined;
719
+ customFetchImpl: import("@better-fetch/fetch").FetchEsque;
720
+ baseURL: string;
721
+ throw?: boolean | undefined;
722
+ auth?: ({
723
+ type: "Bearer";
724
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
725
+ } | {
726
+ type: "Basic";
727
+ username: string | (() => string | undefined) | undefined;
728
+ password: string | (() => string | undefined) | undefined;
729
+ } | {
730
+ type: "Custom";
731
+ prefix: string | (() => string | undefined) | undefined;
732
+ value: string | (() => string | undefined) | undefined;
733
+ }) | undefined;
734
+ body?: any;
735
+ query?: any;
736
+ params?: any;
737
+ duplex?: "full" | "half" | undefined;
738
+ jsonParser: (text: string) => Promise<any> | any;
739
+ retry?: import("@better-fetch/fetch").RetryOptions | undefined;
740
+ retryAttempt?: number | undefined;
741
+ output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
742
+ errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
743
+ disableValidation?: boolean | undefined;
744
+ disableSignal?: boolean | undefined;
745
+ }, unknown, unknown, {}>;
746
+ $store: {
747
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
748
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
749
+ atoms: Record<string, import("nanostores").WritableAtom<any>>;
750
+ };
751
+ $ERROR_CODES: {
752
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
753
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
754
+ FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
755
+ FAILED_TO_UPDATE_USER: import("better-auth").RawError<"FAILED_TO_UPDATE_USER">;
756
+ FAILED_TO_GET_SESSION: import("better-auth").RawError<"FAILED_TO_GET_SESSION">;
757
+ INVALID_PASSWORD: import("better-auth").RawError<"INVALID_PASSWORD">;
758
+ INVALID_EMAIL: import("better-auth").RawError<"INVALID_EMAIL">;
759
+ INVALID_EMAIL_OR_PASSWORD: import("better-auth").RawError<"INVALID_EMAIL_OR_PASSWORD">;
760
+ INVALID_USER: import("better-auth").RawError<"INVALID_USER">;
761
+ SOCIAL_ACCOUNT_ALREADY_LINKED: import("better-auth").RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
762
+ PROVIDER_NOT_FOUND: import("better-auth").RawError<"PROVIDER_NOT_FOUND">;
763
+ INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
764
+ TOKEN_EXPIRED: import("better-auth").RawError<"TOKEN_EXPIRED">;
765
+ ID_TOKEN_NOT_SUPPORTED: import("better-auth").RawError<"ID_TOKEN_NOT_SUPPORTED">;
766
+ FAILED_TO_GET_USER_INFO: import("better-auth").RawError<"FAILED_TO_GET_USER_INFO">;
767
+ USER_EMAIL_NOT_FOUND: import("better-auth").RawError<"USER_EMAIL_NOT_FOUND">;
768
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
769
+ PASSWORD_TOO_SHORT: import("better-auth").RawError<"PASSWORD_TOO_SHORT">;
770
+ PASSWORD_TOO_LONG: import("better-auth").RawError<"PASSWORD_TOO_LONG">;
771
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
772
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
773
+ EMAIL_CAN_NOT_BE_UPDATED: import("better-auth").RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
774
+ CREDENTIAL_ACCOUNT_NOT_FOUND: import("better-auth").RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
775
+ ACCOUNT_NOT_FOUND: import("better-auth").RawError<"ACCOUNT_NOT_FOUND">;
776
+ SESSION_EXPIRED: import("better-auth").RawError<"SESSION_EXPIRED">;
777
+ FAILED_TO_UNLINK_LAST_ACCOUNT: import("better-auth").RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
778
+ USER_ALREADY_HAS_PASSWORD: import("better-auth").RawError<"USER_ALREADY_HAS_PASSWORD">;
779
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import("better-auth").RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
780
+ VERIFICATION_EMAIL_NOT_ENABLED: import("better-auth").RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
781
+ EMAIL_ALREADY_VERIFIED: import("better-auth").RawError<"EMAIL_ALREADY_VERIFIED">;
782
+ EMAIL_MISMATCH: import("better-auth").RawError<"EMAIL_MISMATCH">;
783
+ SESSION_NOT_FRESH: import("better-auth").RawError<"SESSION_NOT_FRESH">;
784
+ LINKED_ACCOUNT_ALREADY_EXISTS: import("better-auth").RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
785
+ INVALID_ORIGIN: import("better-auth").RawError<"INVALID_ORIGIN">;
786
+ INVALID_CALLBACK_URL: import("better-auth").RawError<"INVALID_CALLBACK_URL">;
787
+ INVALID_REDIRECT_URL: import("better-auth").RawError<"INVALID_REDIRECT_URL">;
788
+ INVALID_ERROR_CALLBACK_URL: import("better-auth").RawError<"INVALID_ERROR_CALLBACK_URL">;
789
+ INVALID_NEW_USER_CALLBACK_URL: import("better-auth").RawError<"INVALID_NEW_USER_CALLBACK_URL">;
790
+ MISSING_OR_NULL_ORIGIN: import("better-auth").RawError<"MISSING_OR_NULL_ORIGIN">;
791
+ CALLBACK_URL_REQUIRED: import("better-auth").RawError<"CALLBACK_URL_REQUIRED">;
792
+ FAILED_TO_CREATE_VERIFICATION: import("better-auth").RawError<"FAILED_TO_CREATE_VERIFICATION">;
793
+ FIELD_NOT_ALLOWED: import("better-auth").RawError<"FIELD_NOT_ALLOWED">;
794
+ ASYNC_VALIDATION_NOT_SUPPORTED: import("better-auth").RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
795
+ VALIDATION_ERROR: import("better-auth").RawError<"VALIDATION_ERROR">;
796
+ MISSING_FIELD: import("better-auth").RawError<"MISSING_FIELD">;
797
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import("better-auth").RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
798
+ BODY_MUST_BE_AN_OBJECT: import("better-auth").RawError<"BODY_MUST_BE_AN_OBJECT">;
799
+ PASSWORD_ALREADY_SET: import("better-auth").RawError<"PASSWORD_ALREADY_SET">;
800
+ };
801
+ };
802
+ export type ExpoAuthClient = ReturnType<typeof getExpoAuthClient>;
803
+ //# sourceMappingURL=expoClient.d.ts.map