@absolutejs/auth 0.59.0 → 0.59.1

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 (43) hide show
  1. package/dist/agents/index.d.ts +13 -0
  2. package/dist/cli/import/auth0.d.ts +2 -0
  3. package/dist/cli/import/clerk.d.ts +2 -0
  4. package/dist/cli/import/index.d.ts +10 -0
  5. package/dist/cli/import/lucia.d.ts +2 -0
  6. package/dist/cli/import/nextauth.d.ts +2 -0
  7. package/dist/cli/import/supabase.d.ts +2 -0
  8. package/dist/cli/import/types.d.ts +27 -0
  9. package/dist/cli/migrate.d.ts +2 -0
  10. package/dist/client/components/react/SignIn.d.ts +32 -0
  11. package/dist/client/components/react/SignUp.d.ts +29 -0
  12. package/dist/client/components/react/UserButton.d.ts +36 -0
  13. package/dist/client/createAuthClient.d.ts +285 -0
  14. package/dist/client/index.d.ts +3 -0
  15. package/dist/client/passkeyHelpers.d.ts +19 -0
  16. package/dist/client/react.d.ts +87 -0
  17. package/dist/client/sessionExpiry.d.ts +37 -0
  18. package/dist/client/solid.d.ts +86 -0
  19. package/dist/client/svelte.d.ts +86 -0
  20. package/dist/client/vue.d.ts +88 -0
  21. package/dist/fingerprint-client/index.d.ts +26 -0
  22. package/dist/htmx/index.d.ts +2 -0
  23. package/dist/index.d.ts +3643 -0
  24. package/dist/linkedProviders/index.d.ts +3 -0
  25. package/dist/manifest.d.ts +18 -0
  26. package/dist/manifest.json +373 -0
  27. package/dist/oidc/index.d.ts +12 -0
  28. package/dist/oidc/operator.d.ts +14 -0
  29. package/dist/plugins/denyDisposableEmail.d.ts +7 -0
  30. package/dist/plugins/discordAlert.d.ts +7 -0
  31. package/dist/plugins/geoBlock.d.ts +8 -0
  32. package/dist/plugins/index.d.ts +12 -0
  33. package/dist/plugins/pagerdutyAlert.d.ts +9 -0
  34. package/dist/plugins/posthogIdentify.d.ts +7 -0
  35. package/dist/plugins/slackAlert.d.ts +7 -0
  36. package/dist/providers/index.d.ts +2 -0
  37. package/dist/saml.d.ts +1 -0
  38. package/dist/server.d.ts +32 -0
  39. package/dist/sso/nodeSamlAdapter.d.ts +8 -0
  40. package/dist/vault/index.d.ts +5 -0
  41. package/dist/webauthn/simpleWebAuthnAdapter.d.ts +3 -0
  42. package/dist/webauthn.d.ts +1 -0
  43. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ export { createOAuthAccountLinkedProviderCredentialResolver, type OAuthLinkedProviderAccount, type OAuthLinkedProviderAccountStore } from './oauthAccountResolver';
2
+ export { createOAuthLinkedProviderCredentialResolver } from './oauthResolver';
3
+ export { createLinkedProviderCredentialResolver } from './resolver';
@@ -0,0 +1,18 @@
1
+ import type { AuthConfig } from './types';
2
+ export declare const manifest: Omit<import("@absolutejs/manifest").PackageManifest<AuthConfig<unknown>, never>, "contract" | "settings" | "tools"> & (({
3
+ contract: 1;
4
+ tools?: Record<string, import("@absolutejs/manifest").LegacyManifestTool<never>> | undefined;
5
+ } | {
6
+ contract: 2;
7
+ tools?: Record<string, import("@absolutejs/manifest").AuthorizedManifestTool<never>> | undefined;
8
+ }) & {
9
+ settings: import("@sinclair/typebox").TObject<{
10
+ cleanupIntervalMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
11
+ cookieSecure: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
12
+ maxSessions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
13
+ providersConfiguration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
14
+ scope: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
15
+ }>>>;
16
+ sessionDurationMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
17
+ }>;
18
+ });
@@ -0,0 +1,373 @@
1
+ {
2
+ "contract": 2,
3
+ "discovery": {
4
+ "audiences": [
5
+ "applications",
6
+ "agent-hosts"
7
+ ],
8
+ "intents": [
9
+ "authenticate people and agents",
10
+ "issue scoped agent delegations",
11
+ "publish OAuth discovery"
12
+ ],
13
+ "keywords": [
14
+ "auth",
15
+ "oauth",
16
+ "oidc",
17
+ "agents",
18
+ "delegation",
19
+ "device-flow"
20
+ ],
21
+ "protocols": [
22
+ "OAuth 2.0",
23
+ "OpenID Connect",
24
+ "ID-JAG"
25
+ ]
26
+ },
27
+ "identity": {
28
+ "accent": "#6366f1",
29
+ "category": "auth",
30
+ "description": "OAuth/OIDC sign-in for people and AI agents, including open auth.md registration, scoped delegation, agent account linking, 60+ providers, passkeys, MFA, enterprise SSO/SCIM, organizations, roles, and API keys.",
31
+ "docsUrl": "https://github.com/absolutejs/auth",
32
+ "name": "@absolutejs/auth",
33
+ "tagline": "Let people and agents create accounts and sign in."
34
+ },
35
+ "implements": [
36
+ {
37
+ "contract": "auth/session-store",
38
+ "factory": "createNeonAuthSessionStore",
39
+ "from": "@absolutejs/auth",
40
+ "requires": {
41
+ "env": [
42
+ {
43
+ "description": "Postgres connection string",
44
+ "example": "postgres://user:pass@host/db",
45
+ "key": "DATABASE_URL",
46
+ "secret": true
47
+ }
48
+ ]
49
+ },
50
+ "title": "Your Postgres database (recommended)",
51
+ "wiring": {
52
+ "code": "createNeonAuthSessionStore(${env.DATABASE_URL} ?? \"\", decodeSessionUserRecord)",
53
+ "imports": [
54
+ {
55
+ "from": "@absolutejs/auth",
56
+ "names": [
57
+ "createNeonAuthSessionStore",
58
+ "decodeSessionUserRecord"
59
+ ]
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "contract": "auth/session-store",
66
+ "factory": "createInMemoryAuthSessionStore",
67
+ "from": "@absolutejs/auth",
68
+ "title": "In memory (development only — sign-ins reset on restart)",
69
+ "wiring": {
70
+ "code": "createInMemoryAuthSessionStore()",
71
+ "imports": [
72
+ {
73
+ "from": "@absolutejs/auth",
74
+ "names": [
75
+ "createInMemoryAuthSessionStore"
76
+ ]
77
+ }
78
+ ]
79
+ }
80
+ }
81
+ ],
82
+ "lifecycle": [
83
+ {
84
+ "command": "bunx absolute-auth migrate",
85
+ "id": "migrate",
86
+ "idempotent": true,
87
+ "kind": "migration",
88
+ "title": "Set up the sign-in tables in your database",
89
+ "when": "after-install"
90
+ },
91
+ {
92
+ "command": "bunx absolute-auth migrate",
93
+ "id": "migrate-upgrade",
94
+ "idempotent": true,
95
+ "kind": "migration",
96
+ "title": "Apply new sign-in tables after upgrading",
97
+ "when": "after-upgrade"
98
+ }
99
+ ],
100
+ "presets": [
101
+ {
102
+ "id": "social-login",
103
+ "title": "Social login (Google + GitHub)",
104
+ "values": {
105
+ "providersConfiguration": {
106
+ "github": {},
107
+ "google": {}
108
+ }
109
+ }
110
+ }
111
+ ],
112
+ "requires": {
113
+ "env": [
114
+ {
115
+ "description": "Postgres connection string (sign-in tables live here)",
116
+ "example": "postgres://user:pass@host/db",
117
+ "key": "DATABASE_URL",
118
+ "secret": true
119
+ },
120
+ {
121
+ "description": "Discord OAuth client id",
122
+ "docsUrl": "https://discord.com/developers/applications",
123
+ "key": "DISCORD_CLIENT_ID",
124
+ "when": "providersConfiguration.discord"
125
+ },
126
+ {
127
+ "description": "Discord OAuth client secret",
128
+ "docsUrl": "https://discord.com/developers/applications",
129
+ "key": "DISCORD_CLIENT_SECRET",
130
+ "secret": true,
131
+ "when": "providersConfiguration.discord"
132
+ },
133
+ {
134
+ "description": "Facebook OAuth client id",
135
+ "docsUrl": "https://developers.facebook.com/apps",
136
+ "key": "FACEBOOK_CLIENT_ID",
137
+ "when": "providersConfiguration.facebook"
138
+ },
139
+ {
140
+ "description": "Facebook OAuth client secret",
141
+ "docsUrl": "https://developers.facebook.com/apps",
142
+ "key": "FACEBOOK_CLIENT_SECRET",
143
+ "secret": true,
144
+ "when": "providersConfiguration.facebook"
145
+ },
146
+ {
147
+ "description": "Github OAuth client id",
148
+ "docsUrl": "https://github.com/settings/developers",
149
+ "key": "GITHUB_CLIENT_ID",
150
+ "when": "providersConfiguration.github"
151
+ },
152
+ {
153
+ "description": "Github OAuth client secret",
154
+ "docsUrl": "https://github.com/settings/developers",
155
+ "key": "GITHUB_CLIENT_SECRET",
156
+ "secret": true,
157
+ "when": "providersConfiguration.github"
158
+ },
159
+ {
160
+ "description": "Google OAuth client id",
161
+ "docsUrl": "https://console.cloud.google.com/apis/credentials",
162
+ "key": "GOOGLE_CLIENT_ID",
163
+ "when": "providersConfiguration.google"
164
+ },
165
+ {
166
+ "description": "Google OAuth client secret",
167
+ "docsUrl": "https://console.cloud.google.com/apis/credentials",
168
+ "key": "GOOGLE_CLIENT_SECRET",
169
+ "secret": true,
170
+ "when": "providersConfiguration.google"
171
+ },
172
+ {
173
+ "description": "Linkedin OAuth client id",
174
+ "docsUrl": "https://www.linkedin.com/developers/apps",
175
+ "key": "LINKEDIN_CLIENT_ID",
176
+ "when": "providersConfiguration.linkedin"
177
+ },
178
+ {
179
+ "description": "Linkedin OAuth client secret",
180
+ "docsUrl": "https://www.linkedin.com/developers/apps",
181
+ "key": "LINKEDIN_CLIENT_SECRET",
182
+ "secret": true,
183
+ "when": "providersConfiguration.linkedin"
184
+ },
185
+ {
186
+ "description": "Microsoft OAuth client id",
187
+ "docsUrl": "https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade",
188
+ "key": "MICROSOFT_CLIENT_ID",
189
+ "when": "providersConfiguration.microsoft"
190
+ },
191
+ {
192
+ "description": "Microsoft OAuth client secret",
193
+ "docsUrl": "https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade",
194
+ "key": "MICROSOFT_CLIENT_SECRET",
195
+ "secret": true,
196
+ "when": "providersConfiguration.microsoft"
197
+ },
198
+ {
199
+ "description": "Slack OAuth client id",
200
+ "docsUrl": "https://api.slack.com/apps",
201
+ "key": "SLACK_CLIENT_ID",
202
+ "when": "providersConfiguration.slack"
203
+ },
204
+ {
205
+ "description": "Slack OAuth client secret",
206
+ "docsUrl": "https://api.slack.com/apps",
207
+ "key": "SLACK_CLIENT_SECRET",
208
+ "secret": true,
209
+ "when": "providersConfiguration.slack"
210
+ },
211
+ {
212
+ "description": "Spotify OAuth client id",
213
+ "docsUrl": "https://developer.spotify.com/dashboard",
214
+ "key": "SPOTIFY_CLIENT_ID",
215
+ "when": "providersConfiguration.spotify"
216
+ },
217
+ {
218
+ "description": "Spotify OAuth client secret",
219
+ "docsUrl": "https://developer.spotify.com/dashboard",
220
+ "key": "SPOTIFY_CLIENT_SECRET",
221
+ "secret": true,
222
+ "when": "providersConfiguration.spotify"
223
+ },
224
+ {
225
+ "description": "Twitch OAuth client id",
226
+ "docsUrl": "https://dev.twitch.tv/console/apps",
227
+ "key": "TWITCH_CLIENT_ID",
228
+ "when": "providersConfiguration.twitch"
229
+ },
230
+ {
231
+ "description": "Twitch OAuth client secret",
232
+ "docsUrl": "https://dev.twitch.tv/console/apps",
233
+ "key": "TWITCH_CLIENT_SECRET",
234
+ "secret": true,
235
+ "when": "providersConfiguration.twitch"
236
+ }
237
+ ],
238
+ "peers": [
239
+ {
240
+ "name": "elysia",
241
+ "range": ">=1.0",
242
+ "reason": "plugin host"
243
+ }
244
+ ],
245
+ "services": [
246
+ {
247
+ "description": "Stores accounts, sessions, and audit events",
248
+ "id": "postgres"
249
+ }
250
+ ]
251
+ },
252
+ "settings": {
253
+ "type": "object",
254
+ "properties": {
255
+ "cleanupIntervalMs": {
256
+ "description": "How often expired sessions are swept, in milliseconds.",
257
+ "minimum": 1000,
258
+ "title": "Session cleanup interval",
259
+ "x-group": "advanced",
260
+ "type": "number"
261
+ },
262
+ "cookieSecure": {
263
+ "description": "Only send the sign-in cookie over HTTPS. Leave off in local development.",
264
+ "title": "HTTPS-only cookies",
265
+ "x-group": "advanced",
266
+ "type": "boolean"
267
+ },
268
+ "maxSessions": {
269
+ "description": "How many devices someone can stay signed in on at once.",
270
+ "minimum": 1,
271
+ "title": "Signed-in devices per person",
272
+ "x-group": "sessions",
273
+ "type": "integer"
274
+ },
275
+ "providersConfiguration": {
276
+ "description": "Which services people can sign in with. Each needs a client id and secret from that provider.",
277
+ "title": "Sign-in providers",
278
+ "x-group": "providers",
279
+ "type": "object",
280
+ "patternProperties": {
281
+ "^(.*)$": {
282
+ "type": "object",
283
+ "properties": {
284
+ "scope": {
285
+ "description": "Extra permissions to request from the provider.",
286
+ "title": "Permissions",
287
+ "type": "array",
288
+ "items": {
289
+ "type": "string"
290
+ }
291
+ }
292
+ }
293
+ }
294
+ }
295
+ },
296
+ "sessionDurationMs": {
297
+ "description": "How long someone stays signed in, in milliseconds. Default is 7 days.",
298
+ "minimum": 60000,
299
+ "title": "Stay signed in for",
300
+ "x-group": "sessions",
301
+ "type": "number"
302
+ }
303
+ }
304
+ },
305
+ "slots": {
306
+ "sessionStore": {
307
+ "configPath": "authSessionStore",
308
+ "contract": "auth/session-store",
309
+ "description": "Where live sign-in sessions are kept",
310
+ "known": [
311
+ "@absolutejs/auth#postgres",
312
+ "@absolutejs/auth#memory"
313
+ ],
314
+ "required": true
315
+ },
316
+ "verificationProvider": {
317
+ "configPath": "verificationProvider",
318
+ "contract": "auth/verification-provider",
319
+ "description": "Provider-managed phone verification for MFA and future passwordless flows",
320
+ "known": [
321
+ "@absolutejs/auth-twilio"
322
+ ],
323
+ "required": false
324
+ }
325
+ },
326
+ "wiring": [
327
+ {
328
+ "description": "Sign in with Google, GitHub, and 60+ other services. Add email/password later from settings.",
329
+ "id": "default",
330
+ "server": {
331
+ "code": ".use(\n\tawait auth({\n\t\t// TODO: return your application user for a session subject.\n\t\tgetUser: (sub) => ({ sub }),\n\t\tauthSessionStore: ${slot.sessionStore},\n\t\tcookieSecure: ${settings.cookieSecure},\n\t\tmaxSessions: ${settings.maxSessions},\n\t\tprovidersConfiguration: providersFromEnv(${settings.providersConfiguration} ?? {}),\n\t\tsessionDurationMs: ${settings.sessionDurationMs}\n\t})\n)",
332
+ "imports": [
333
+ {
334
+ "from": "@absolutejs/auth",
335
+ "names": [
336
+ "auth",
337
+ "providersFromEnv"
338
+ ]
339
+ }
340
+ ],
341
+ "placement": "server-plugin"
342
+ },
343
+ "title": "Social sign-in (OAuth)"
344
+ }
345
+ ],
346
+ "tools": {
347
+ "list_sign_in_providers": {
348
+ "annotations": {
349
+ "readOnlyHint": true
350
+ },
351
+ "authorization": {
352
+ "approval": "never",
353
+ "audience": "admin",
354
+ "effects": [
355
+ "read"
356
+ ],
357
+ "requiredScopes": [
358
+ "auth:inspect"
359
+ ]
360
+ },
361
+ "capabilities": [
362
+ "read",
363
+ "glob"
364
+ ],
365
+ "description": "List which sign-in providers this project has configured, and which are missing credentials.",
366
+ "input": {
367
+ "type": "object",
368
+ "properties": {}
369
+ },
370
+ "kind": "workspace"
371
+ }
372
+ }
373
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Declaration-stable OIDC provider entry point.
3
+ *
4
+ * Server applications that only need to issue and verify OAuth/OIDC tokens
5
+ * should import this subpath instead of loading every optional Auth feature
6
+ * through the package root.
7
+ */
8
+ export type { OidcProviderConfig } from './config';
9
+ export { generateSigningKey, jwkThumbprint, signJwt, signingVerificationKeys, toPublicJwk, verifyJwt, verifyJwtWithKeys, type SigningKey, type SigningKeyIdentity } from './keys';
10
+ export { revokeOAuthClientCredentials } from './operator';
11
+ export { createNeonAuthorizationCodeStore, createNeonClientAssertionJtiStore, createNeonClientRegistrationTokenStore, createNeonDeviceAuthorizationStore, createNeonInitialAccessTokenStore, createNeonOAuthClientStore, createNeonOidcRefreshTokenStore, createPostgresAuthorizationCodeStore, createPostgresClientAssertionJtiStore, createPostgresClientRegistrationTokenStore, createPostgresDeviceAuthorizationStore, createPostgresInitialAccessTokenStore, createPostgresOAuthClientStore, createPostgresOidcRefreshTokenStore } from './postgresStores';
12
+ export type { AuthorizationCodeStore, ClientAssertionJtiStore, ClientRegistrationTokenStore, DeviceAuthorizationStore, InitialAccessTokenStore, OAuthClient, OAuthClientStore, OidcRefreshTokenConnection, OidcRefreshTokenStore } from './types';
@@ -0,0 +1,14 @@
1
+ import type { AuthorizationCodeStore, ClientRegistrationTokenStore, DeviceAuthorizationStore, OidcRefreshTokenStore } from './types';
2
+ type OAuthClientCredentialStores = {
3
+ authorizationCodeStore: AuthorizationCodeStore;
4
+ clientRegistrationTokenStore: ClientRegistrationTokenStore;
5
+ deviceAuthorizationStore: DeviceAuthorizationStore;
6
+ refreshTokenStore: OidcRefreshTokenStore;
7
+ };
8
+ export declare const revokeOAuthClientCredentials: (clientId: string, stores: OAuthClientCredentialStores) => Promise<{
9
+ revokedAuthorizationCodes: number;
10
+ revokedDeviceAuthorizations: number;
11
+ revokedRefreshTokens: number;
12
+ revokedRegistrationTokens: number;
13
+ }>;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ export type DenyDisposableEmailDecision = {
2
+ allow: false;
3
+ reason: string;
4
+ } | {
5
+ allow: true;
6
+ };
7
+ export declare const denyDisposableEmailPlugin: (email: string) => Promise<DenyDisposableEmailDecision>;
@@ -0,0 +1,7 @@
1
+ import type { AuditEvent, AuditEventType, AuditSink } from '../audit/types';
2
+ export type DiscordAlertOptions = {
3
+ events?: readonly AuditEventType[];
4
+ formatContent?: (event: AuditEvent) => string;
5
+ webhookUrl: string;
6
+ };
7
+ export declare const discordAlertPlugin: ({ events, formatContent, webhookUrl }: DiscordAlertOptions) => AuditSink;
@@ -0,0 +1,8 @@
1
+ export type GeoBlockOptions = {
2
+ allowCountries: readonly string[];
3
+ denyCountries?: never;
4
+ } | {
5
+ allowCountries?: never;
6
+ denyCountries: readonly string[];
7
+ };
8
+ export declare const geoBlockPlugin: (options: GeoBlockOptions) => (headers: Record<string, string | undefined>) => boolean;
@@ -0,0 +1,12 @@
1
+ export { denyDisposableEmailPlugin } from './denyDisposableEmail';
2
+ export type { DenyDisposableEmailDecision } from './denyDisposableEmail';
3
+ export { discordAlertPlugin } from './discordAlert';
4
+ export type { DiscordAlertOptions } from './discordAlert';
5
+ export { geoBlockPlugin } from './geoBlock';
6
+ export type { GeoBlockOptions } from './geoBlock';
7
+ export { pagerdutyAlertPlugin } from './pagerdutyAlert';
8
+ export type { PagerDutyAlertOptions, PagerDutySeverity } from './pagerdutyAlert';
9
+ export { posthogIdentifyPlugin } from './posthogIdentify';
10
+ export type { PosthogIdentifyOptions } from './posthogIdentify';
11
+ export { slackAlertPlugin } from './slackAlert';
12
+ export type { SlackAlertOptions } from './slackAlert';
@@ -0,0 +1,9 @@
1
+ import type { AuditEventType, AuditSink } from '../audit/types';
2
+ export type PagerDutySeverity = 'critical' | 'error' | 'info' | 'warning';
3
+ export type PagerDutyAlertOptions = {
4
+ events?: readonly AuditEventType[];
5
+ routingKey: string;
6
+ severity?: PagerDutySeverity;
7
+ source?: string;
8
+ };
9
+ export declare const pagerdutyAlertPlugin: ({ events, routingKey, severity, source }: PagerDutyAlertOptions) => AuditSink;
@@ -0,0 +1,7 @@
1
+ import type { AuditEvent, AuditSink } from '../audit/types';
2
+ export type PosthogIdentifyOptions = {
3
+ host?: string;
4
+ projectApiKey: string;
5
+ properties?: (event: AuditEvent) => Record<string, unknown>;
6
+ };
7
+ export declare const posthogIdentifyPlugin: ({ host, projectApiKey, properties }: PosthogIdentifyOptions) => AuditSink;
@@ -0,0 +1,7 @@
1
+ import type { AuditEvent, AuditEventType, AuditSink } from '../audit/types';
2
+ export type SlackAlertOptions = {
3
+ events?: readonly AuditEventType[];
4
+ formatMessage?: (event: AuditEvent) => string;
5
+ webhookUrl: string;
6
+ };
7
+ export declare const slackAlertPlugin: ({ events, formatMessage, webhookUrl }: SlackAlertOptions) => AuditSink;
@@ -0,0 +1,2 @@
1
+ export type { CredentialsFor, OAuth2Client, OAuth2TokenResponse, OIDCProvider, PKCEProvider, ProviderConfiguration, ProviderOption, ProvidersMap, RefreshableProvider, RevocableProvider, ScopeRequiredProvider } from 'citra';
2
+ export { decodeJWT, extractPropFromIdentity, isOIDCProviderOption, isPKCEProviderOption, isRefreshableOAuth2Client, isRefreshableProviderOption, isRevocableOAuth2Client, isRevocableProviderOption, isValidProviderOption, oidcProviderOptions, pkceProviderOptions, providerOptions, providers, refreshableProviderOptions, revocableProviderOptions, scopeRequiredProviderOptions } from 'citra';
package/dist/saml.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { createNodeSamlAdapter, type NodeSamlAdapterOptions } from './sso/nodeSamlAdapter';
@@ -0,0 +1,32 @@
1
+ import type { AuthInstance } from './authContext';
2
+ import type { AuthConfig } from './types';
3
+ /**
4
+ * Create the complete AbsoluteJS auth application through a declaration-stable
5
+ * server entry point. Import this subpath in server applications so TypeScript
6
+ * does not need to load declarations for every optional Auth feature.
7
+ */
8
+ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Promise<AuthInstance<UserType>>;
9
+ export { createAuthContext } from './authContext';
10
+ export type { AuthInstance } from './authContext';
11
+ export type { AuditSink } from './audit/types';
12
+ export type { PortalConfig } from './portal/config';
13
+ export type { SetupCapability, SetupSession, SetupSessionStore } from './portal/types';
14
+ export { createSetupSession } from './portal/operations';
15
+ export { createPostgresSetupSessionStore } from './portal/postgresSetupSessionStore';
16
+ export { protectRoutePlugin } from './routes/protectRoute';
17
+ export type { ScimConfig } from './scim/config';
18
+ export type { ScimFilter, ScimGroup, ScimGroupInput, ScimTokenStore, ScimUser, ScimUserInput } from './scim/types';
19
+ export { createPostgresScimTokenStore } from './scim/postgresScimTokenStore';
20
+ export type { AuthSessionStore } from './session/types';
21
+ export { VerificationProviderError, type VerificationCheckInput, type VerificationCheckResult, type VerificationCheckStatus, type VerificationProvider, type VerificationProviderErrorKind, type VerificationPurpose, type VerificationStartInput, type VerificationStartResult } from './verification/types';
22
+ export type { NodeSamlAdapterOptions } from './sso/nodeSamlAdapter';
23
+ export { createNodeSamlAdapter } from './sso/nodeSamlAdapter';
24
+ export type { SsoIdentity, SSOConfig } from './sso/config';
25
+ export type { SSOConnection, SSOConnectionStore } from './sso/types';
26
+ export { createPostgresSsoConnectionStore } from './sso/postgresSsoConnectionStore';
27
+ export { isUserSessionId } from './typeGuards';
28
+ export { userSessionIdTypebox } from './typebox';
29
+ export type { AuthConfig, OAuth2ConfigurationOptions, SessionData, UnregisteredSessionData, UserSessionId } from './types';
30
+ export { instantiateUserSession } from './utils';
31
+ export type { OAuth2TokenResponse, ProviderOption } from 'citra';
32
+ export { extractPropFromIdentity, isValidProviderOption, providers } from 'citra';
@@ -0,0 +1,8 @@
1
+ import 'reflect-metadata';
2
+ import type { SamlAdapter } from './config';
3
+ export type NodeSamlAdapterOptions = {
4
+ spPrivateKey?: string;
5
+ spCertificate?: string;
6
+ signatureAlgorithm?: 'sha1' | 'sha256' | 'sha512';
7
+ };
8
+ export declare const createNodeSamlAdapter: (options?: NodeSamlAdapterOptions) => Promise<SamlAdapter>;
@@ -0,0 +1,5 @@
1
+ export { createSecretCipher, createVersionedSecretCipher, type SecretCipher } from '../compliance/cipher';
2
+ export { createVault, rotateVaultKey, type Vault } from './config';
3
+ export { createInMemoryVaultStore } from './inMemoryVaultStore';
4
+ export { createNeonVaultStore, createPostgresVaultStore, vaultEntriesTable } from './postgresVaultStore';
5
+ export type { VaultEntry, VaultStore } from './types';
@@ -0,0 +1,3 @@
1
+ import 'reflect-metadata';
2
+ import type { WebAuthnAdapter } from './adapter';
3
+ export declare const createSimpleWebAuthnAdapter: () => Promise<WebAuthnAdapter>;
@@ -0,0 +1 @@
1
+ export { createSimpleWebAuthnAdapter } from './webauthn/simpleWebAuthnAdapter';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.59.0",
2
+ "version": "0.59.1",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "test": "bun test",
23
23
  "format": "absolute prettier --write",
24
24
  "lint": "absolute eslint",
25
- "prepack": "bun -e \"for (const path of ['dist/oidc/config.d.ts','dist/oidc/types.d.ts','dist/oidc/postgresStores.d.ts']) if (!(await Bun.file(path).exists())) throw new Error('Run bun run build before packing: missing ' + path)\"",
25
+ "prepack": "bun -e \"for (const path of ['dist/index.d.ts','dist/server.d.ts','dist/agents/index.d.ts','dist/oidc/index.d.ts','dist/oidc/config.d.ts','dist/oidc/types.d.ts','dist/oidc/postgresStores.d.ts']) if (!(await Bun.file(path).exists())) throw new Error('Run bun run build before packing: missing ' + path)\"",
26
26
  "typecheck": "absolute typecheck",
27
27
  "verify-package": "absolute-manifest verify-package",
28
28
  "check:package": "bun run typecheck && bun run lint && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts",