@authowl/core 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { R as ResolvedAuthConfig, A as AuthConfig } from './organization-membership-BIify9hZ.js';
2
- export { D as DecodedPublishableKey, H as HasParams, O as OrganizationMembership, c as createMembershipHas, d as decodePublishableKey, r as resolveConfig } from './organization-membership-BIify9hZ.js';
3
- import { b as AuthOwlClient, S as SocialIdTokenOptions, c as PasskeySignInOptions, A as ActionFetchOptions, a as AuthActionResult, d as PasskeyAuthData, e as AddPasskeyOptions, f as AuthPasskey } from './client-DXypEWpf.js';
4
- export { g as AuthClientError, h as AuthSession, i as AuthUser, C as CreatePrivacyRightsRequestOptions, O as Organization, j as OrganizationClient, k as OrganizationDetails, l as PrivacyClient, m as PrivacyConsentPreference, n as PrivacyConsentState, o as PrivacyLocale, p as PrivacyRightState, q as PrivacyRightType, r as PrivacyRightsRequest, P as PublicConfig, R as RecordPrivacyConsentOptions, s as SessionState, t as SessionStore, u as SetActiveOrganizationOptions, v as SocialAuthData, w as getPublicConfig } from './client-DXypEWpf.js';
5
- import { c as createAuthHttpClient, A as AuthHttpClient } from './idempotency-BWMPd3B7.js';
6
- export { P as ProjectCapabilities, a as createIdempotencyKey, r as resolveProjectCapabilities } from './idempotency-BWMPd3B7.js';
1
+ import { b as AuthOwlClient, S as SocialIdTokenOptions, R as ResolvedAuthConfig, P as PasskeySignInOptions, A as ActionFetchOptions, a as AuthActionResult, c as PasskeyAuthData, d as AddPasskeyOptions, e as AuthPasskey, f as AuthConfig } from './config-CyUwyJ9B.js';
2
+ export { g as AuthClientError, h as AuthSession, i as AuthUser, C as CreatePrivacyRightsRequestOptions, D as DecodedPublishableKey, H as HasParams, O as Organization, j as OrganizationClient, k as OrganizationDetails, l as OrganizationMembership, m as PrivacyClient, n as PrivacyConsentPreference, o as PrivacyConsentState, p as PrivacyLocale, q as PrivacyRightState, r as PrivacyRightType, s as PrivacyRightsRequest, t as RecordPrivacyConsentOptions, u as SessionState, v as SessionStore, w as SetActiveOrganizationOptions, x as SocialAuthData, y as createMembershipHas, z as decodePublishableKey, B as resolveConfig } from './config-CyUwyJ9B.js';
3
+ import { c as createAuthHttpClient, A as AuthHttpClient } from './idempotency-fDhUiiGz.js';
4
+ export { P as ProjectCapabilities, a as createIdempotencyKey, r as resolveProjectCapabilities } from './idempotency-fDhUiiGz.js';
7
5
  import { startAuthentication, startRegistration } from '@simplewebauthn/browser';
6
+ export { P as PublicConfig, g as getPublicConfig } from './public-config-Drxchm7N.js';
8
7
  export { a as LOCALES, L as Locale, d as directionFor, i as isLocale } from './index-DgVPDEYx.js';
9
8
  export { buildPrivacySignUpEvidence } from './privacy.js';
10
9
  export { s as sessionCookieName } from './cookie-BqcfagTw.js';
@@ -24,7 +23,7 @@ interface PasskeyCeremonyClient {
24
23
  signIn: AuthActionClient['signIn']['passkey'];
25
24
  add: AuthActionClient['passkey']['addPasskey'];
26
25
  }
27
- type PasskeyCeremonyClientFactory = (http: ReturnType<typeof createAuthHttpClient>, sessionChanged: () => void) => PasskeyCeremonyClient;
26
+ type PasskeyCeremonyClientFactory = (http: ReturnType<typeof createAuthHttpClient>, sessionChanged: () => void | Promise<void>) => PasskeyCeremonyClient;
28
27
  /**
29
28
  * Auth actions that can execute without browser navigation or WebAuthn.
30
29
  *
@@ -118,7 +117,7 @@ interface PasskeyCeremony {
118
117
  */
119
118
  errorCode?(error: unknown): string | undefined;
120
119
  }
121
- declare function createPasskeyClient(http: AuthHttpClient, sessionChanged: () => void, ceremony: PasskeyCeremony): {
120
+ declare function createPasskeyClient(http: AuthHttpClient, sessionChanged: () => void | Promise<void>, ceremony: PasskeyCeremony): {
122
121
  signIn(options?: PasskeySignInOptions, fetchOptions?: ActionFetchOptions): Promise<AuthActionResult<PasskeyAuthData>>;
123
122
  add(options?: AddPasskeyOptions, fetchOptions?: ActionFetchOptions): Promise<AuthActionResult<AuthPasskey>>;
124
123
  };
package/dist/native.js CHANGED
@@ -1 +1 @@
1
- import {l}from'./chunk-DVVGVPDH.js';export{l as createNativeAuthClient,m as createPasskeyClient,n as getPublicConfig,a as resolveProjectCapabilities}from'./chunk-DVVGVPDH.js';export{a as LOCALES,b as directionFor,c as isLocale}from'./chunk-M4QJVSXT.js';export{a as buildPrivacySignUpEvidence}from'./chunk-MW6RNUTR.js';export{a as createIdempotencyKey}from'./chunk-5NL5GJW6.js';import {n}from'./chunk-IB6TFQFD.js';export{F as createMembershipHas,a as decodePublishableKey,n as resolveConfig,b as sessionCookieName}from'./chunk-IB6TFQFD.js';import'./chunk-T5SH3ZZP.js';function P(i,o){return l(n(i),o)}export{P as createNativeClient};
1
+ import {l}from'./chunk-LBCOMERN.js';export{l as createNativeAuthClient,m as createPasskeyClient,n as getPublicConfig,a as resolveProjectCapabilities}from'./chunk-LBCOMERN.js';export{a as LOCALES,b as directionFor,c as isLocale}from'./chunk-M4QJVSXT.js';export{a as buildPrivacySignUpEvidence}from'./chunk-MW6RNUTR.js';export{a as createIdempotencyKey}from'./chunk-5NL5GJW6.js';import {o}from'./chunk-YL2FF2VS.js';export{G as createMembershipHas,a as decodePublishableKey,o as resolveConfig,b as sessionCookieName}from'./chunk-YL2FF2VS.js';import'./chunk-T5SH3ZZP.js';function P(i,o$1){return l(o(i),o$1)}export{P as createNativeClient};
@@ -1,5 +1,5 @@
1
- import { P as PublicConfig, o as PrivacyLocale } from './client-BwZ1bqU4.cjs';
2
- import './organization-membership-BIify9hZ.cjs';
1
+ import { P as PublicConfig } from './public-config-DojOd5F7.cjs';
2
+ import { p as PrivacyLocale } from './config-CyUwyJ9B.cjs';
3
3
 
4
4
  type PrivacyPublicConfig = NonNullable<PublicConfig['privacy']>;
5
5
  /**
package/dist/privacy.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PublicConfig, o as PrivacyLocale } from './client-DXypEWpf.js';
2
- import './organization-membership-BIify9hZ.js';
1
+ import { P as PublicConfig } from './public-config-Drxchm7N.js';
2
+ import { p as PrivacyLocale } from './config-CyUwyJ9B.js';
3
3
 
4
4
  type PrivacyPublicConfig = NonNullable<PublicConfig['privacy']>;
5
5
  /**
@@ -0,0 +1,241 @@
1
+ import { R as ResolvedAuthConfig } from './config-CyUwyJ9B.cjs';
2
+
3
+ type EnvironmentType = 'development' | 'production';
4
+ /**
5
+ * The public, publishable-key-safe project config the SDK renders its sign-in
6
+ * UI from (server contract CONTRACTS §2, `GET /api/projects/:id/public-config`).
7
+ * Nothing here is secret. Method slugs are canonical snake_case.
8
+ */
9
+ /**
10
+ * A project's configured bot challenge.
11
+ *
12
+ * `provider` is deliberately a plain string rather than a union of the ones this
13
+ * SDK can render. A project may be switched to a provider that predates the
14
+ * copy of the SDK an application is running, and the difference between
15
+ * "no challenge configured" and "a challenge this build cannot render" is the
16
+ * difference between signing in and a silent 403 the user cannot act on. Keeping
17
+ * the slug lets the renderer say which provider it does not know.
18
+ */
19
+ interface CaptchaConfig {
20
+ provider: string;
21
+ siteKey: string;
22
+ }
23
+ type PublicConfig = {
24
+ /** Stable workspace product container shared by its environments. */
25
+ applicationId: string;
26
+ /** Stable tenant id for the exact environment selected by the publishable key. */
27
+ environmentId: string;
28
+ /** Environment class that determines key prefixes and billing treatment. */
29
+ environmentType: EnvironmentType;
30
+ /**
31
+ * Authentication endpoint used by this SDK instance. Hosted portals and
32
+ * custom domains keep this same-origin even when the stable JWT issuer uses
33
+ * the platform's canonical origin.
34
+ */
35
+ authBaseUrl: string;
36
+ /**
37
+ * Public acquisition mode. Optional only for rolling compatibility with
38
+ * servers released before waitlist support.
39
+ */
40
+ signUp?: {
41
+ mode: 'open' | 'restricted' | 'allowlist' | 'waitlist';
42
+ };
43
+ /**
44
+ * Identity and credential lifecycle policy. Optional only for rolling
45
+ * compatibility with AuthOwl servers released before plan 35.
46
+ */
47
+ authentication?: {
48
+ email: {
49
+ signUp: boolean;
50
+ signIn: Array<'password' | 'magic_link' | 'email_otp'>;
51
+ };
52
+ phone: {
53
+ signUp: boolean;
54
+ signIn: boolean;
55
+ };
56
+ password: {
57
+ signUp: boolean;
58
+ add: boolean;
59
+ /** Server-owned password length policy. Optional for rolling compatibility. */
60
+ minLength?: number;
61
+ maxLength?: number;
62
+ };
63
+ passkey: {
64
+ signIn: boolean;
65
+ add: boolean;
66
+ /**
67
+ * The domain this environment binds passkeys to. Absent or null means the
68
+ * server derives it from the auth host, which is what every server before
69
+ * this field did - so treating both the same keeps a new SDK correct
70
+ * against an older server.
71
+ */
72
+ relyingPartyId?: string | null;
73
+ };
74
+ username: {
75
+ collectOnSignUp: boolean;
76
+ signIn: boolean;
77
+ };
78
+ };
79
+ /** Email ownership ceremony selected by the project. */
80
+ emailVerification?: {
81
+ required: boolean;
82
+ method: 'link' | 'code';
83
+ };
84
+ /** End-user profile fields and self-service permissions. */
85
+ userModel?: {
86
+ requireEmail: boolean;
87
+ firstLastName: boolean;
88
+ emailChange: boolean;
89
+ accountDeletion: boolean;
90
+ };
91
+ /**
92
+ * MFA presentation contract. Backup codes follow TOTP and are not an
93
+ * independently configurable authentication method.
94
+ */
95
+ mfa?: {
96
+ totp: boolean;
97
+ required: boolean;
98
+ backupCodes: boolean;
99
+ /** Whether an emailed code may recover a TOTP challenge. Defaults to true for older servers. */
100
+ emailOtpFallback?: boolean;
101
+ /** Whether a successful challenge may remember this browser. Defaults to true for older servers. */
102
+ trustDevice?: boolean;
103
+ };
104
+ branding: {
105
+ appName?: string;
106
+ logoUrl?: string;
107
+ /** Whether the application name is visible beside the logo. */
108
+ showAppName?: boolean;
109
+ /** Alignment of the brand identity within managed component headers. */
110
+ alignment?: 'left' | 'center' | 'right';
111
+ primaryColor?: string;
112
+ theme?: 'light' | 'dark' | 'system';
113
+ };
114
+ /** Canonical method slugs, e.g. "password", "magic_link", "passkey". */
115
+ enabledMethods: string[];
116
+ /** Configured social provider ids, e.g. "google". */
117
+ socialProviders: string[];
118
+ /**
119
+ * Public OAuth client ids keyed by provider. Optional for rolling compatibility
120
+ * with servers released before Google One Tap support.
121
+ */
122
+ socialProviderClientIds?: Record<string, string>;
123
+ /**
124
+ * When true, an email/password sign-up does not create a session - the user
125
+ * must confirm their address first. <SignUp/> shows a "check your email" state
126
+ * instead of redirecting. Always false unless password sign-up is enabled.
127
+ */
128
+ requireEmailVerification: boolean;
129
+ /**
130
+ * Legal consent gate. When `required`, <SignUp/> shows an acceptance checkbox
131
+ * linking `termsUrl`/`privacyUrl` and blocks sign-up until it's checked, echoing
132
+ * `version` back so the server records and enforces it. `required` is true only
133
+ * when the project both requires consent and has a document URL to link.
134
+ */
135
+ legal: {
136
+ termsUrl?: string;
137
+ privacyUrl?: string;
138
+ version: number;
139
+ required: boolean;
140
+ };
141
+ /** Published, bilingual privacy notices and optional consent purposes. */
142
+ privacy?: {
143
+ notices: Array<{
144
+ noticeId: string;
145
+ noticeVersionId: string;
146
+ code: string;
147
+ version: number;
148
+ title: {
149
+ en: string;
150
+ ar: string;
151
+ };
152
+ body: {
153
+ en: string;
154
+ ar: string;
155
+ };
156
+ digest: {
157
+ en: string;
158
+ ar: string;
159
+ };
160
+ activityCodes: string[];
161
+ purposeCodes: string[];
162
+ effectiveFrom: string;
163
+ }>;
164
+ consentPurposes: Array<{
165
+ purposeId: string;
166
+ purposeVersionId: string;
167
+ code: string;
168
+ version: number;
169
+ title: {
170
+ en: string;
171
+ ar: string;
172
+ };
173
+ description: {
174
+ en: string;
175
+ ar: string;
176
+ };
177
+ digest: {
178
+ en: string;
179
+ ar: string;
180
+ };
181
+ activityCodes: string[];
182
+ dataCategories: string[];
183
+ }>;
184
+ };
185
+ /**
186
+ * Whether the project lets signed-in users enrol a second factor (TOTP). A
187
+ * capability flag, not a sign-in method (so it's absent from `enabledMethods`):
188
+ * gate an "enable two-factor" affordance / <MFAEnrollment/> on it. The sign-in
189
+ * 2FA challenge is handled by <SignIn/> regardless of this flag.
190
+ */
191
+ twoFactor: boolean;
192
+ /** Whether enrolled MFA is mandatory rather than optional for this project. */
193
+ mfaRequired: boolean;
194
+ /** Whether signed-in users may delete their own account. */
195
+ accountDeletion: boolean;
196
+ /** Whether organization routes and components are available for this project. */
197
+ organizations: boolean;
198
+ /**
199
+ * Whether inbound enterprise SSO is enabled for this project. SSO IS a sign-in
200
+ * method, so when true the server also pushes `'sso'` into `enabledMethods`;
201
+ * this flag mirrors the server capability (matching the `twoFactor`
202
+ * convention). <SignIn/> gates the SSO affordance on `enabledMethods`, not on
203
+ * this flag, so the two never drift.
204
+ */
205
+ sso: boolean;
206
+ /**
207
+ * JWT issuer (server contract CONTRACTS §8). Non-null only when the project's
208
+ * issuer toggle is on: exactly what a third-party verifier needs (Convex
209
+ * `auth.config.ts` = `{ type: "customJwt", issuer, jwks: jwksUrl,
210
+ * applicationID: aud, algorithm: "ES256" }`). The issuer remains stable when
211
+ * `authBaseUrl` follows a hosted or custom account-portal origin.
212
+ */
213
+ jwtIssuer: {
214
+ issuer: string;
215
+ jwksUrl: string;
216
+ aud: string;
217
+ } | null;
218
+ /**
219
+ * The bot challenge a project has configured, provider-agnostic.
220
+ *
221
+ * Prefer this over the two Turnstile fields below, which predate provider
222
+ * choice and remain populated whenever the provider IS Turnstile.
223
+ */
224
+ captcha: CaptchaConfig | null;
225
+ /** Public Cloudflare Turnstile site key for the phone OTP challenge. */
226
+ turnstileSiteKey: string | null;
227
+ /** Public Cloudflare Turnstile site key for protected sign-up/sign-in actions. */
228
+ authTurnstileSiteKey: string | null;
229
+ locale: string;
230
+ badge: boolean;
231
+ configVersion: number;
232
+ };
233
+ /**
234
+ * Fetch a project's public config. Publishable-key gated server-side; sent
235
+ * without cookies (the payload is public, so no session is needed). Throws on a
236
+ * non-2xx response so the caller can distinguish "config unavailable" from a
237
+ * project that simply has a method disabled.
238
+ */
239
+ declare function getPublicConfig(config: ResolvedAuthConfig): Promise<PublicConfig>;
240
+
241
+ export { type EnvironmentType as E, type PublicConfig as P, getPublicConfig as g };
@@ -0,0 +1,241 @@
1
+ import { R as ResolvedAuthConfig } from './config-CyUwyJ9B.js';
2
+
3
+ type EnvironmentType = 'development' | 'production';
4
+ /**
5
+ * The public, publishable-key-safe project config the SDK renders its sign-in
6
+ * UI from (server contract CONTRACTS §2, `GET /api/projects/:id/public-config`).
7
+ * Nothing here is secret. Method slugs are canonical snake_case.
8
+ */
9
+ /**
10
+ * A project's configured bot challenge.
11
+ *
12
+ * `provider` is deliberately a plain string rather than a union of the ones this
13
+ * SDK can render. A project may be switched to a provider that predates the
14
+ * copy of the SDK an application is running, and the difference between
15
+ * "no challenge configured" and "a challenge this build cannot render" is the
16
+ * difference between signing in and a silent 403 the user cannot act on. Keeping
17
+ * the slug lets the renderer say which provider it does not know.
18
+ */
19
+ interface CaptchaConfig {
20
+ provider: string;
21
+ siteKey: string;
22
+ }
23
+ type PublicConfig = {
24
+ /** Stable workspace product container shared by its environments. */
25
+ applicationId: string;
26
+ /** Stable tenant id for the exact environment selected by the publishable key. */
27
+ environmentId: string;
28
+ /** Environment class that determines key prefixes and billing treatment. */
29
+ environmentType: EnvironmentType;
30
+ /**
31
+ * Authentication endpoint used by this SDK instance. Hosted portals and
32
+ * custom domains keep this same-origin even when the stable JWT issuer uses
33
+ * the platform's canonical origin.
34
+ */
35
+ authBaseUrl: string;
36
+ /**
37
+ * Public acquisition mode. Optional only for rolling compatibility with
38
+ * servers released before waitlist support.
39
+ */
40
+ signUp?: {
41
+ mode: 'open' | 'restricted' | 'allowlist' | 'waitlist';
42
+ };
43
+ /**
44
+ * Identity and credential lifecycle policy. Optional only for rolling
45
+ * compatibility with AuthOwl servers released before plan 35.
46
+ */
47
+ authentication?: {
48
+ email: {
49
+ signUp: boolean;
50
+ signIn: Array<'password' | 'magic_link' | 'email_otp'>;
51
+ };
52
+ phone: {
53
+ signUp: boolean;
54
+ signIn: boolean;
55
+ };
56
+ password: {
57
+ signUp: boolean;
58
+ add: boolean;
59
+ /** Server-owned password length policy. Optional for rolling compatibility. */
60
+ minLength?: number;
61
+ maxLength?: number;
62
+ };
63
+ passkey: {
64
+ signIn: boolean;
65
+ add: boolean;
66
+ /**
67
+ * The domain this environment binds passkeys to. Absent or null means the
68
+ * server derives it from the auth host, which is what every server before
69
+ * this field did - so treating both the same keeps a new SDK correct
70
+ * against an older server.
71
+ */
72
+ relyingPartyId?: string | null;
73
+ };
74
+ username: {
75
+ collectOnSignUp: boolean;
76
+ signIn: boolean;
77
+ };
78
+ };
79
+ /** Email ownership ceremony selected by the project. */
80
+ emailVerification?: {
81
+ required: boolean;
82
+ method: 'link' | 'code';
83
+ };
84
+ /** End-user profile fields and self-service permissions. */
85
+ userModel?: {
86
+ requireEmail: boolean;
87
+ firstLastName: boolean;
88
+ emailChange: boolean;
89
+ accountDeletion: boolean;
90
+ };
91
+ /**
92
+ * MFA presentation contract. Backup codes follow TOTP and are not an
93
+ * independently configurable authentication method.
94
+ */
95
+ mfa?: {
96
+ totp: boolean;
97
+ required: boolean;
98
+ backupCodes: boolean;
99
+ /** Whether an emailed code may recover a TOTP challenge. Defaults to true for older servers. */
100
+ emailOtpFallback?: boolean;
101
+ /** Whether a successful challenge may remember this browser. Defaults to true for older servers. */
102
+ trustDevice?: boolean;
103
+ };
104
+ branding: {
105
+ appName?: string;
106
+ logoUrl?: string;
107
+ /** Whether the application name is visible beside the logo. */
108
+ showAppName?: boolean;
109
+ /** Alignment of the brand identity within managed component headers. */
110
+ alignment?: 'left' | 'center' | 'right';
111
+ primaryColor?: string;
112
+ theme?: 'light' | 'dark' | 'system';
113
+ };
114
+ /** Canonical method slugs, e.g. "password", "magic_link", "passkey". */
115
+ enabledMethods: string[];
116
+ /** Configured social provider ids, e.g. "google". */
117
+ socialProviders: string[];
118
+ /**
119
+ * Public OAuth client ids keyed by provider. Optional for rolling compatibility
120
+ * with servers released before Google One Tap support.
121
+ */
122
+ socialProviderClientIds?: Record<string, string>;
123
+ /**
124
+ * When true, an email/password sign-up does not create a session - the user
125
+ * must confirm their address first. <SignUp/> shows a "check your email" state
126
+ * instead of redirecting. Always false unless password sign-up is enabled.
127
+ */
128
+ requireEmailVerification: boolean;
129
+ /**
130
+ * Legal consent gate. When `required`, <SignUp/> shows an acceptance checkbox
131
+ * linking `termsUrl`/`privacyUrl` and blocks sign-up until it's checked, echoing
132
+ * `version` back so the server records and enforces it. `required` is true only
133
+ * when the project both requires consent and has a document URL to link.
134
+ */
135
+ legal: {
136
+ termsUrl?: string;
137
+ privacyUrl?: string;
138
+ version: number;
139
+ required: boolean;
140
+ };
141
+ /** Published, bilingual privacy notices and optional consent purposes. */
142
+ privacy?: {
143
+ notices: Array<{
144
+ noticeId: string;
145
+ noticeVersionId: string;
146
+ code: string;
147
+ version: number;
148
+ title: {
149
+ en: string;
150
+ ar: string;
151
+ };
152
+ body: {
153
+ en: string;
154
+ ar: string;
155
+ };
156
+ digest: {
157
+ en: string;
158
+ ar: string;
159
+ };
160
+ activityCodes: string[];
161
+ purposeCodes: string[];
162
+ effectiveFrom: string;
163
+ }>;
164
+ consentPurposes: Array<{
165
+ purposeId: string;
166
+ purposeVersionId: string;
167
+ code: string;
168
+ version: number;
169
+ title: {
170
+ en: string;
171
+ ar: string;
172
+ };
173
+ description: {
174
+ en: string;
175
+ ar: string;
176
+ };
177
+ digest: {
178
+ en: string;
179
+ ar: string;
180
+ };
181
+ activityCodes: string[];
182
+ dataCategories: string[];
183
+ }>;
184
+ };
185
+ /**
186
+ * Whether the project lets signed-in users enrol a second factor (TOTP). A
187
+ * capability flag, not a sign-in method (so it's absent from `enabledMethods`):
188
+ * gate an "enable two-factor" affordance / <MFAEnrollment/> on it. The sign-in
189
+ * 2FA challenge is handled by <SignIn/> regardless of this flag.
190
+ */
191
+ twoFactor: boolean;
192
+ /** Whether enrolled MFA is mandatory rather than optional for this project. */
193
+ mfaRequired: boolean;
194
+ /** Whether signed-in users may delete their own account. */
195
+ accountDeletion: boolean;
196
+ /** Whether organization routes and components are available for this project. */
197
+ organizations: boolean;
198
+ /**
199
+ * Whether inbound enterprise SSO is enabled for this project. SSO IS a sign-in
200
+ * method, so when true the server also pushes `'sso'` into `enabledMethods`;
201
+ * this flag mirrors the server capability (matching the `twoFactor`
202
+ * convention). <SignIn/> gates the SSO affordance on `enabledMethods`, not on
203
+ * this flag, so the two never drift.
204
+ */
205
+ sso: boolean;
206
+ /**
207
+ * JWT issuer (server contract CONTRACTS §8). Non-null only when the project's
208
+ * issuer toggle is on: exactly what a third-party verifier needs (Convex
209
+ * `auth.config.ts` = `{ type: "customJwt", issuer, jwks: jwksUrl,
210
+ * applicationID: aud, algorithm: "ES256" }`). The issuer remains stable when
211
+ * `authBaseUrl` follows a hosted or custom account-portal origin.
212
+ */
213
+ jwtIssuer: {
214
+ issuer: string;
215
+ jwksUrl: string;
216
+ aud: string;
217
+ } | null;
218
+ /**
219
+ * The bot challenge a project has configured, provider-agnostic.
220
+ *
221
+ * Prefer this over the two Turnstile fields below, which predate provider
222
+ * choice and remain populated whenever the provider IS Turnstile.
223
+ */
224
+ captcha: CaptchaConfig | null;
225
+ /** Public Cloudflare Turnstile site key for the phone OTP challenge. */
226
+ turnstileSiteKey: string | null;
227
+ /** Public Cloudflare Turnstile site key for protected sign-up/sign-in actions. */
228
+ authTurnstileSiteKey: string | null;
229
+ locale: string;
230
+ badge: boolean;
231
+ configVersion: number;
232
+ };
233
+ /**
234
+ * Fetch a project's public config. Publishable-key gated server-side; sent
235
+ * without cookies (the payload is public, so no session is needed). Throws on a
236
+ * non-2xx response so the caller can distinguish "config unavailable" from a
237
+ * project that simply has a method disabled.
238
+ */
239
+ declare function getPublicConfig(config: ResolvedAuthConfig): Promise<PublicConfig>;
240
+
241
+ export { type EnvironmentType as E, type PublicConfig as P, getPublicConfig as g };