@entro314labs/entro-auth 1.8.0-beta.11 → 1.8.0-beta.12

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.
@@ -92,7 +92,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
92
92
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
93
93
  newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
94
94
  errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
95
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
95
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
96
96
  disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
97
97
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
98
98
  token: import("zod").ZodString;
@@ -120,7 +120,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
120
120
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
121
121
  newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
122
122
  errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
123
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
123
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
124
124
  disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
125
125
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
126
126
  token: import("zod").ZodString;
@@ -209,7 +209,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
209
209
  } & import("@entro314labs/entro-auth-core/db").InferDBFieldsFromOptions<Option["user"]> & import("@entro314labs/entro-auth-core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never;
210
210
  }>;
211
211
  readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
212
- method: ("POST" | "GET")[];
212
+ method: ("GET" | "POST")[];
213
213
  operationId: string;
214
214
  body: import("zod").ZodOptional<import("zod").ZodObject<{
215
215
  code: import("zod").ZodOptional<import("zod").ZodString>;
@@ -235,7 +235,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
235
235
  };
236
236
  }, void>;
237
237
  readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
238
- method: ("POST" | "GET")[];
238
+ method: ("GET" | "POST")[];
239
239
  operationId: string;
240
240
  query: import("zod").ZodOptional<import("zod").ZodObject<{
241
241
  disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
@@ -1592,7 +1592,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
1592
1592
  requireHeaders: true;
1593
1593
  body: import("zod").ZodObject<{
1594
1594
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1595
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
1595
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
1596
1596
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
1597
1597
  token: import("zod").ZodString;
1598
1598
  nonce: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1669,7 +1669,7 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
1669
1669
  readonly issueIdTokenNonce: import("better-call").StrictEndpoint<"/id-token/nonce", {
1670
1670
  method: "POST";
1671
1671
  body: import("zod").ZodObject<{
1672
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
1672
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
1673
1673
  }, import("zod/v4/core").$strip>;
1674
1674
  metadata: {
1675
1675
  noStore: boolean;
@@ -1778,9 +1778,9 @@ export declare function getEndpoints<Option extends EntroAuthOptions>(ctx: Await
1778
1778
  id: string;
1779
1779
  createdAt: Date;
1780
1780
  updatedAt: Date;
1781
+ userId: string;
1781
1782
  providerId: string;
1782
1783
  accountId: string;
1783
- userId: string;
1784
1784
  }[]>;
1785
1785
  readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
1786
1786
  method: "GET";
@@ -2139,7 +2139,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
2139
2139
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2140
2140
  newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2141
2141
  errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2142
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
2142
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
2143
2143
  disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
2144
2144
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
2145
2145
  token: import("zod").ZodString;
@@ -2167,7 +2167,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
2167
2167
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2168
2168
  newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2169
2169
  errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2170
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
2170
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
2171
2171
  disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
2172
2172
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
2173
2173
  token: import("zod").ZodString;
@@ -2256,7 +2256,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
2256
2256
  } & import("@entro314labs/entro-auth-core/db").InferDBFieldsFromOptions<Option["user"]> & import("@entro314labs/entro-auth-core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_4) ? { [K_1 in keyof T_4]: T_4[K_1]; } : never;
2257
2257
  }>;
2258
2258
  readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
2259
- method: ("POST" | "GET")[];
2259
+ method: ("GET" | "POST")[];
2260
2260
  operationId: string;
2261
2261
  body: import("zod").ZodOptional<import("zod").ZodObject<{
2262
2262
  code: import("zod").ZodOptional<import("zod").ZodString>;
@@ -2282,7 +2282,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
2282
2282
  };
2283
2283
  }, void>;
2284
2284
  readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
2285
- method: ("POST" | "GET")[];
2285
+ method: ("GET" | "POST")[];
2286
2286
  operationId: string;
2287
2287
  query: import("zod").ZodOptional<import("zod").ZodObject<{
2288
2288
  disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
@@ -3639,7 +3639,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
3639
3639
  requireHeaders: true;
3640
3640
  body: import("zod").ZodObject<{
3641
3641
  callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
3642
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
3642
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
3643
3643
  idToken: import("zod").ZodOptional<import("zod").ZodObject<{
3644
3644
  token: import("zod").ZodString;
3645
3645
  nonce: import("zod").ZodOptional<import("zod").ZodString>;
@@ -3716,7 +3716,7 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
3716
3716
  readonly issueIdTokenNonce: import("better-call").StrictEndpoint<"/id-token/nonce", {
3717
3717
  method: "POST";
3718
3718
  body: import("zod").ZodObject<{
3719
- provider: import("zod").ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, import("zod/v4/core").$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
3719
+ provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
3720
3720
  }, import("zod/v4/core").$strip>;
3721
3721
  metadata: {
3722
3722
  noStore: boolean;
@@ -3825,9 +3825,9 @@ export declare const router: <Option extends EntroAuthOptions>(ctx: AuthContext,
3825
3825
  id: string;
3826
3826
  createdAt: Date;
3827
3827
  updatedAt: Date;
3828
+ userId: string;
3828
3829
  providerId: string;
3829
3830
  accountId: string;
3830
- userId: string;
3831
3831
  }[]>;
3832
3832
  readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
3833
3833
  method: "GET";
@@ -79,16 +79,16 @@ export declare const listUserAccounts: import("better-call").StrictEndpoint<"/li
79
79
  id: string;
80
80
  createdAt: Date;
81
81
  updatedAt: Date;
82
+ userId: string;
82
83
  providerId: string;
83
84
  accountId: string;
84
- userId: string;
85
85
  }[]>;
86
86
  export declare const linkSocialAccount: import("better-call").StrictEndpoint<"/link-social", {
87
87
  method: "POST";
88
88
  requireHeaders: true;
89
89
  body: z.ZodObject<{
90
90
  callbackURL: z.ZodOptional<z.ZodString>;
91
- provider: z.ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, z.core.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
91
+ provider: z.ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, z.core.$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
92
92
  idToken: z.ZodOptional<z.ZodObject<{
93
93
  token: z.ZodString;
94
94
  nonce: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  export declare const callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
3
- method: ("POST" | "GET")[];
3
+ method: ("GET" | "POST")[];
4
4
  operationId: string;
5
5
  body: z.ZodOptional<z.ZodObject<{
6
6
  code: z.ZodOptional<z.ZodString>;
@@ -51,7 +51,7 @@ export declare function consumeIssuedIdTokenNonce(ctx: GenericEndpointContext, p
51
51
  export declare const issueIdTokenNonce: import("better-call").StrictEndpoint<"/id-token/nonce", {
52
52
  method: "POST";
53
53
  body: z.ZodObject<{
54
- provider: z.ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, z.core.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
54
+ provider: z.ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, z.core.$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
55
55
  }, z.core.$strip>;
56
56
  metadata: {
57
57
  noStore: boolean;
@@ -4,7 +4,7 @@ import "../../types/index.mjs";
4
4
  import { EntroAuthOptions, GenericEndpointContext } from "@entro314labs/entro-auth-core";
5
5
  import * as z from "zod";
6
6
  export declare const getSession: <Option extends EntroAuthOptions>() => import("better-call").StrictEndpoint<"/get-session", {
7
- method: ("POST" | "GET")[];
7
+ method: ("GET" | "POST")[];
8
8
  operationId: string;
9
9
  query: z.ZodOptional<z.ZodObject<{
10
10
  disableCookieCache: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
@@ -5,7 +5,7 @@ declare const socialSignInBodySchema: z.ZodObject<{
5
5
  callbackURL: z.ZodOptional<z.ZodString>;
6
6
  newUserCallbackURL: z.ZodOptional<z.ZodString>;
7
7
  errorCallbackURL: z.ZodOptional<z.ZodString>;
8
- provider: z.ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, z.core.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
8
+ provider: z.ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, z.core.$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
9
9
  disableRedirect: z.ZodOptional<z.ZodBoolean>;
10
10
  idToken: z.ZodOptional<z.ZodObject<{
11
11
  token: z.ZodString;
@@ -34,7 +34,7 @@ export declare const signInSocial: <O extends EntroAuthOptions>() => import("bet
34
34
  callbackURL: z.ZodOptional<z.ZodString>;
35
35
  newUserCallbackURL: z.ZodOptional<z.ZodString>;
36
36
  errorCallbackURL: z.ZodOptional<z.ZodString>;
37
- provider: z.ZodType<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown, z.core.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {}), unknown>>;
37
+ provider: z.ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, z.core.$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
38
38
  disableRedirect: z.ZodOptional<z.ZodBoolean>;
39
39
  idToken: z.ZodOptional<z.ZodObject<{
40
40
  token: z.ZodString;
@@ -5,7 +5,7 @@ export declare const getClientConfig: (options?: EntroAuthClientOptions | undefi
5
5
  readonly baseURL: string;
6
6
  pluginsActions: Record<string, any>;
7
7
  pluginsAtoms: Record<string, WritableAtom<any>>;
8
- pluginPathMethods: Record<string, "POST" | "GET">;
8
+ pluginPathMethods: Record<string, "GET" | "POST">;
9
9
  atomListeners: ClientAtomListener[];
10
10
  hydrateSession: (sessionData: SessionData | null) => void;
11
11
  $sessionSignal: import("nanostores").PreinitializedWritableAtom<boolean> & object;
@@ -14,30 +14,30 @@ export declare const getClientConfig: (options?: EntroAuthClientOptions | undefi
14
14
  id: string;
15
15
  name: string;
16
16
  hooks: {
17
- onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
18
- onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
19
- 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;
20
- onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
17
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
21
18
  };
22
19
  } | {
23
20
  id: string;
24
21
  name: string;
25
22
  hooks: {
26
- onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
23
+ onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
24
+ onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
25
+ 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;
26
+ onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
27
27
  };
28
28
  })[];
29
- method: string;
30
- redirect?: RequestRedirect | undefined;
31
- window?: null | undefined;
32
29
  cache?: RequestCache | undefined;
33
30
  credentials?: RequestCredentials;
34
31
  integrity?: string | undefined;
35
32
  keepalive?: boolean | undefined;
33
+ method: string;
36
34
  mode?: RequestMode | undefined;
37
35
  priority?: RequestPriority | undefined;
36
+ redirect?: RequestRedirect | undefined;
38
37
  referrer?: string | undefined;
39
38
  referrerPolicy?: ReferrerPolicy | undefined;
40
39
  signal?: AbortSignal | null;
40
+ window?: null | undefined;
41
41
  onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
42
42
  hookOptions?: {
43
43
  cloneResponse?: boolean;
package/dist/package.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  // package.json
2
- var version = "1.8.0-beta.11";
2
+ var version = "1.8.0-beta.12";
3
3
  export { version };
@@ -273,8 +273,8 @@ export declare const admin: <O extends AdminOptions>(options?: O | undefined) =>
273
273
  query: import("zod").ZodObject<{
274
274
  searchValue: import("zod").ZodOptional<import("zod").ZodString>;
275
275
  searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
276
- name: "name";
277
276
  email: "email";
277
+ name: "name";
278
278
  }>>;
279
279
  searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
280
280
  contains: "contains";
@@ -34,7 +34,16 @@ const captcha = (options) => ({
34
34
  });
35
35
  if (!options.secretKey) throw new Error(INTERNAL_ERROR_CODES.MISSING_SECRET_KEY.message);
36
36
  const captchaResponse = request.headers.get("x-captcha-response");
37
- const remoteUserIP = getIP(request, ctx.options) ?? void 0;
37
+ const remoteUserIP = getIP(request, {
38
+ ...ctx.options,
39
+ advanced: {
40
+ ...ctx.options.advanced,
41
+ ipAddress: {
42
+ ...ctx.options.advanced?.ipAddress,
43
+ ipv6Subnet: 128
44
+ }
45
+ }
46
+ }) ?? void 0;
38
47
  if (!captchaResponse) return middlewareResponse({
39
48
  message: EXTERNAL_ERROR_CODES.MISSING_RESPONSE.message,
40
49
  code: EXTERNAL_ERROR_CODES.MISSING_RESPONSE.code,
@@ -304,7 +304,7 @@ export declare const getOrgAdapter: <O extends OrganizationOptions>(context: Aut
304
304
  invitation: InferInvitation<O>[];
305
305
  member: InferMember<O>[];
306
306
  team: InferTeam<O>[] | undefined;
307
- }, "team" | "invitation" | "member"> & {
307
+ }, "member" | "team" | "invitation"> & {
308
308
  invitations: ((O["teams"] extends {
309
309
  enabled: true;
310
310
  } ? {
@@ -245,8 +245,8 @@ export declare const roleSchema: z.ZodString;
245
245
  export declare const invitationStatus: z.ZodDefault<z.ZodEnum<{
246
246
  pending: "pending";
247
247
  accepted: "accepted";
248
- canceled: "canceled";
249
248
  rejected: "rejected";
249
+ canceled: "canceled";
250
250
  }>>;
251
251
  export declare const organizationSchema: z.ZodObject<{
252
252
  id: z.ZodDefault<z.ZodString>;
@@ -271,8 +271,8 @@ export declare const invitationSchema: z.ZodObject<{
271
271
  status: z.ZodDefault<z.ZodEnum<{
272
272
  pending: "pending";
273
273
  accepted: "accepted";
274
- canceled: "canceled";
275
274
  rejected: "rejected";
275
+ canceled: "canceled";
276
276
  }>>;
277
277
  teamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
278
  inviterId: z.ZodString;
@@ -10,20 +10,20 @@ export declare const phoneNumberClient: () => {
10
10
  signal: "$sessionSignal";
11
11
  }[];
12
12
  $ERROR_CODES: {
13
+ OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
14
+ INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
15
+ TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
13
16
  INVALID_PHONE_NUMBER: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
14
17
  PHONE_NUMBER_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
15
18
  PHONE_NUMBER_NOT_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
16
19
  INVALID_PHONE_NUMBER_OR_PASSWORD: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
17
20
  UNEXPECTED_ERROR: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
18
21
  OTP_NOT_FOUND: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
19
- OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
20
- INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
21
22
  PHONE_NUMBER_NOT_VERIFIED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
22
23
  PHONE_NUMBER_PENDING_VERIFICATION: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_PENDING_VERIFICATION">;
23
24
  PHONE_NUMBER_CANNOT_BE_UPDATED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
24
25
  PHONE_NUMBER_CANNOT_BE_SET: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_SET">;
25
26
  SEND_OTP_NOT_IMPLEMENTED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
26
- TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
27
27
  };
28
28
  };
29
29
  export { PHONE_NUMBER_ERROR_CODES, type PhoneNumberOptions, type UserWithPhoneNumber };
@@ -1,16 +1,16 @@
1
1
  export declare const PHONE_NUMBER_ERROR_CODES: {
2
+ OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
3
+ INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
4
+ TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
2
5
  INVALID_PHONE_NUMBER: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
3
6
  PHONE_NUMBER_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
4
7
  PHONE_NUMBER_NOT_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
5
8
  INVALID_PHONE_NUMBER_OR_PASSWORD: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
6
9
  UNEXPECTED_ERROR: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
7
10
  OTP_NOT_FOUND: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
8
- OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
9
- INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
10
11
  PHONE_NUMBER_NOT_VERIFIED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
11
12
  PHONE_NUMBER_PENDING_VERIFICATION: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_PENDING_VERIFICATION">;
12
13
  PHONE_NUMBER_CANNOT_BE_UPDATED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
13
14
  PHONE_NUMBER_CANNOT_BE_SET: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_SET">;
14
15
  SEND_OTP_NOT_IMPLEMENTED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
15
- TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
16
16
  };
@@ -357,20 +357,20 @@ export declare const phoneNumber: (options?: PhoneNumberOptions | undefined) =>
357
357
  }[];
358
358
  options: PhoneNumberOptions | undefined;
359
359
  $ERROR_CODES: {
360
+ OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
361
+ INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
362
+ TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
360
363
  INVALID_PHONE_NUMBER: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER">;
361
364
  PHONE_NUMBER_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_EXIST">;
362
365
  PHONE_NUMBER_NOT_EXIST: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_EXIST">;
363
366
  INVALID_PHONE_NUMBER_OR_PASSWORD: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
364
367
  UNEXPECTED_ERROR: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"UNEXPECTED_ERROR">;
365
368
  OTP_NOT_FOUND: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_NOT_FOUND">;
366
- OTP_EXPIRED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"OTP_EXPIRED">;
367
- INVALID_OTP: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"INVALID_OTP">;
368
369
  PHONE_NUMBER_NOT_VERIFIED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
369
370
  PHONE_NUMBER_PENDING_VERIFICATION: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_PENDING_VERIFICATION">;
370
371
  PHONE_NUMBER_CANNOT_BE_UPDATED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
371
372
  PHONE_NUMBER_CANNOT_BE_SET: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"PHONE_NUMBER_CANNOT_BE_SET">;
372
373
  SEND_OTP_NOT_IMPLEMENTED: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
373
- TOO_MANY_ATTEMPTS: import("@entro314labs/entro-auth-core/utils/error-codes").RawError<"TOO_MANY_ATTEMPTS">;
374
374
  };
375
375
  };
376
376
  export type { PhoneNumberOptions, UserWithPhoneNumber };
@@ -54,17 +54,17 @@ export declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
54
54
  body: z.ZodObject<{
55
55
  password: z.ZodOptional<z.ZodString>;
56
56
  method: z.ZodDefault<z.ZodEnum<{
57
+ passkey: "passkey";
57
58
  otp: "otp";
58
59
  totp: "totp";
59
- passkey: "passkey";
60
60
  }>>;
61
61
  issuer: z.ZodOptional<z.ZodString>;
62
62
  }, z.core.$strip> | z.ZodObject<{
63
63
  password: z.ZodString;
64
64
  method: z.ZodDefault<z.ZodEnum<{
65
+ passkey: "passkey";
65
66
  otp: "otp";
66
67
  totp: "totp";
67
- passkey: "passkey";
68
68
  }>>;
69
69
  issuer: z.ZodOptional<z.ZodString>;
70
70
  }, z.core.$strip>;
@@ -646,7 +646,7 @@ export declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
646
646
  matcher(context: import("@entro314labs/entro-auth-core").HookEndpointContext): boolean;
647
647
  handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
648
648
  twoFactorRedirect: boolean;
649
- twoFactorMethods: ("otp" | "totp" | "passkey")[];
649
+ twoFactorMethods: ("passkey" | "otp" | "totp")[];
650
650
  twoFactorBackupCodes: boolean;
651
651
  } | undefined>>;
652
652
  }[];
@@ -1,6 +1,7 @@
1
1
  import { sessionMiddleware } from "../../../api/routes/session.mjs";
2
2
  import { setSessionCookie } from "../../../cookies/index.mjs";
3
3
  import { symmetricDecrypt } from "../../../crypto/index.mjs";
4
+ import { parseUserOutput } from "../../../db/schema.mjs";
4
5
  import { shouldRequirePassword } from "../../../utils/password.mjs";
5
6
  import { PACKAGE_VERSION } from "../../../version.mjs";
6
7
  import { withTwoFactorClaim } from "../claim.mjs";
@@ -232,6 +233,10 @@ const totp2fa = (options) => {
232
233
  user: turnedOn
233
234
  });
234
235
  await ctx.context.internalAdapter.deleteSession(activeSession.token);
236
+ return ctx.json({
237
+ token: newSession.token,
238
+ user: parseUserOutput(ctx.context.options, turnedOn)
239
+ });
235
240
  }
236
241
  return valid(ctx);
237
242
  });
@@ -72,30 +72,30 @@ export declare function getHttpTestInstance<O extends Partial<EntroAuthOptions>,
72
72
  id: string;
73
73
  name: string;
74
74
  hooks: {
75
- onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
76
- onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
77
- 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;
78
- onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
75
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
79
76
  };
80
77
  } | {
81
78
  id: string;
82
79
  name: string;
83
80
  hooks: {
84
- onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
81
+ onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
82
+ onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
83
+ 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;
84
+ onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
85
85
  };
86
86
  })[];
87
- method: string;
88
- redirect?: RequestRedirect | undefined;
89
- window?: null | undefined;
90
87
  cache?: RequestCache | undefined;
91
88
  credentials?: RequestCredentials;
92
89
  integrity?: string | undefined;
93
90
  keepalive?: boolean | undefined;
91
+ method: string;
94
92
  mode?: RequestMode | undefined;
95
93
  priority?: RequestPriority | undefined;
94
+ redirect?: RequestRedirect | undefined;
96
95
  referrer?: string | undefined;
97
96
  referrerPolicy?: ReferrerPolicy | undefined;
98
97
  signal?: AbortSignal | null;
98
+ window?: null | undefined;
99
99
  onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
100
100
  hookOptions?: {
101
101
  cloneResponse?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entro314labs/entro-auth",
3
- "version": "1.8.0-beta.11",
3
+ "version": "1.8.0-beta.12",
4
4
  "description": "The most comprehensive authentication framework for TypeScript.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -485,10 +485,10 @@
485
485
  }
486
486
  },
487
487
  "dependencies": {
488
- "@entro314labs/entro-auth-core": "1.8.0-beta.11",
489
- "@entro314labs/entro-auth-drizzle-adapter": "1.8.0-beta.11",
490
- "@entro314labs/entro-auth-kysely-adapter": "1.8.0-beta.11",
491
- "@entro314labs/entro-auth-memory-adapter": "1.8.0-beta.11",
488
+ "@entro314labs/entro-auth-core": "1.8.0-beta.12",
489
+ "@entro314labs/entro-auth-drizzle-adapter": "1.8.0-beta.12",
490
+ "@entro314labs/entro-auth-kysely-adapter": "1.8.0-beta.12",
491
+ "@entro314labs/entro-auth-memory-adapter": "1.8.0-beta.12",
492
492
  "@better-auth/utils": "0.5.1",
493
493
  "@better-fetch/fetch": "1.3.3",
494
494
  "@noble/ciphers": "^2.2.0",