@absolutejs/auth 0.82.0 → 0.83.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/index.d.ts CHANGED
@@ -2404,17 +2404,17 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2404
2404
  claims?: string | undefined;
2405
2405
  resource?: string | undefined;
2406
2406
  request?: string | undefined;
2407
+ state?: string | undefined;
2408
+ response_mode?: string | undefined;
2409
+ code_challenge?: string | undefined;
2407
2410
  redirect_uri?: string | undefined;
2411
+ response_type?: string | undefined;
2408
2412
  acr_values?: string | undefined;
2409
- code_challenge?: string | undefined;
2410
2413
  code_challenge_method?: string | undefined;
2411
2414
  id_token_hint?: string | undefined;
2412
2415
  max_age?: string | undefined;
2413
2416
  prompt?: string | undefined;
2414
2417
  request_uri?: string | undefined;
2415
- response_mode?: string | undefined;
2416
- response_type?: string | undefined;
2417
- state?: string | undefined;
2418
2418
  };
2419
2419
  headers: unknown;
2420
2420
  response: {
@@ -2448,8 +2448,8 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2448
2448
  grant_type?: string | undefined;
2449
2449
  claim_token?: string | undefined;
2450
2450
  assertion?: string | undefined;
2451
- client_secret?: string | undefined;
2452
2451
  redirect_uri?: string | undefined;
2452
+ client_secret?: string | undefined;
2453
2453
  client_assertion?: string | undefined;
2454
2454
  client_assertion_type?: string | undefined;
2455
2455
  code_verifier?: string | undefined;
@@ -2486,13 +2486,13 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2486
2486
  audience?: string | undefined;
2487
2487
  claims?: string | undefined;
2488
2488
  resource?: string | undefined;
2489
- client_secret?: string | undefined;
2489
+ state?: string | undefined;
2490
+ code_challenge?: string | undefined;
2490
2491
  redirect_uri?: string | undefined;
2492
+ response_type?: string | undefined;
2493
+ client_secret?: string | undefined;
2491
2494
  acr_values?: string | undefined;
2492
- code_challenge?: string | undefined;
2493
2495
  code_challenge_method?: string | undefined;
2494
- response_type?: string | undefined;
2495
- state?: string | undefined;
2496
2496
  client_assertion?: string | undefined;
2497
2497
  client_assertion_type?: string | undefined;
2498
2498
  };
@@ -2583,9 +2583,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2583
2583
  body: {
2584
2584
  client_id?: string | undefined;
2585
2585
  scope?: string | undefined;
2586
- client_secret?: string | undefined;
2587
2586
  login_hint?: string | undefined;
2588
2587
  binding_message?: string | undefined;
2588
+ client_secret?: string | undefined;
2589
2589
  };
2590
2590
  params: {};
2591
2591
  query: unknown;
@@ -2671,8 +2671,8 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2671
2671
  params: {};
2672
2672
  query: {
2673
2673
  client_id?: string | undefined;
2674
- id_token_hint?: string | undefined;
2675
2674
  state?: string | undefined;
2675
+ id_token_hint?: string | undefined;
2676
2676
  post_logout_redirect_uri?: string | undefined;
2677
2677
  };
2678
2678
  headers: unknown;
@@ -2697,8 +2697,8 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2697
2697
  post: {
2698
2698
  body: {
2699
2699
  client_id?: string | undefined;
2700
- id_token_hint?: string | undefined;
2701
2700
  state?: string | undefined;
2701
+ id_token_hint?: string | undefined;
2702
2702
  post_logout_redirect_uri?: string | undefined;
2703
2703
  };
2704
2704
  params: {};
@@ -2727,11 +2727,11 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2727
2727
  jwks?: any;
2728
2728
  scope?: string | undefined;
2729
2729
  backchannel_logout_uri?: string | undefined;
2730
- client_name?: string | undefined;
2731
- grant_types?: string[] | undefined;
2732
2730
  jwks_uri?: string | undefined;
2733
2731
  post_logout_redirect_uris?: string[] | undefined;
2734
2732
  redirect_uris?: string[] | undefined;
2733
+ client_name?: string | undefined;
2734
+ grant_types?: string[] | undefined;
2735
2735
  };
2736
2736
  params: {};
2737
2737
  query: unknown;
@@ -2791,11 +2791,11 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
2791
2791
  jwks?: any;
2792
2792
  scope?: string | undefined;
2793
2793
  backchannel_logout_uri?: string | undefined;
2794
- client_name?: string | undefined;
2795
- grant_types?: string[] | undefined;
2796
2794
  jwks_uri?: string | undefined;
2797
2795
  post_logout_redirect_uris?: string[] | undefined;
2798
2796
  redirect_uris?: string[] | undefined;
2797
+ client_name?: string | undefined;
2798
+ grant_types?: string[] | undefined;
2799
2799
  };
2800
2800
  params: {
2801
2801
  clientId: string;
@@ -24,17 +24,17 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
24
24
  claims?: string | undefined;
25
25
  resource?: string | undefined;
26
26
  request?: string | undefined;
27
+ state?: string | undefined;
28
+ response_mode?: string | undefined;
29
+ code_challenge?: string | undefined;
27
30
  redirect_uri?: string | undefined;
31
+ response_type?: string | undefined;
28
32
  acr_values?: string | undefined;
29
- code_challenge?: string | undefined;
30
33
  code_challenge_method?: string | undefined;
31
34
  id_token_hint?: string | undefined;
32
35
  max_age?: string | undefined;
33
36
  prompt?: string | undefined;
34
37
  request_uri?: string | undefined;
35
- response_mode?: string | undefined;
36
- response_type?: string | undefined;
37
- state?: string | undefined;
38
38
  };
39
39
  headers: unknown;
40
40
  response: {
@@ -68,8 +68,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
68
68
  grant_type?: string | undefined;
69
69
  claim_token?: string | undefined;
70
70
  assertion?: string | undefined;
71
- client_secret?: string | undefined;
72
71
  redirect_uri?: string | undefined;
72
+ client_secret?: string | undefined;
73
73
  client_assertion?: string | undefined;
74
74
  client_assertion_type?: string | undefined;
75
75
  code_verifier?: string | undefined;
@@ -106,13 +106,13 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
106
106
  audience?: string | undefined;
107
107
  claims?: string | undefined;
108
108
  resource?: string | undefined;
109
- client_secret?: string | undefined;
109
+ state?: string | undefined;
110
+ code_challenge?: string | undefined;
110
111
  redirect_uri?: string | undefined;
112
+ response_type?: string | undefined;
113
+ client_secret?: string | undefined;
111
114
  acr_values?: string | undefined;
112
- code_challenge?: string | undefined;
113
115
  code_challenge_method?: string | undefined;
114
- response_type?: string | undefined;
115
- state?: string | undefined;
116
116
  client_assertion?: string | undefined;
117
117
  client_assertion_type?: string | undefined;
118
118
  };
@@ -203,9 +203,9 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
203
203
  body: {
204
204
  client_id?: string | undefined;
205
205
  scope?: string | undefined;
206
- client_secret?: string | undefined;
207
206
  login_hint?: string | undefined;
208
207
  binding_message?: string | undefined;
208
+ client_secret?: string | undefined;
209
209
  };
210
210
  params: {};
211
211
  query: unknown;
@@ -291,8 +291,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
291
291
  params: {};
292
292
  query: {
293
293
  client_id?: string | undefined;
294
- id_token_hint?: string | undefined;
295
294
  state?: string | undefined;
295
+ id_token_hint?: string | undefined;
296
296
  post_logout_redirect_uri?: string | undefined;
297
297
  };
298
298
  headers: unknown;
@@ -317,8 +317,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
317
317
  post: {
318
318
  body: {
319
319
  client_id?: string | undefined;
320
- id_token_hint?: string | undefined;
321
320
  state?: string | undefined;
321
+ id_token_hint?: string | undefined;
322
322
  post_logout_redirect_uri?: string | undefined;
323
323
  };
324
324
  params: {};
@@ -347,11 +347,11 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
347
347
  jwks?: any;
348
348
  scope?: string | undefined;
349
349
  backchannel_logout_uri?: string | undefined;
350
- client_name?: string | undefined;
351
- grant_types?: string[] | undefined;
352
350
  jwks_uri?: string | undefined;
353
351
  post_logout_redirect_uris?: string[] | undefined;
354
352
  redirect_uris?: string[] | undefined;
353
+ client_name?: string | undefined;
354
+ grant_types?: string[] | undefined;
355
355
  };
356
356
  params: {};
357
357
  query: unknown;
@@ -411,11 +411,11 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
411
411
  jwks?: any;
412
412
  scope?: string | undefined;
413
413
  backchannel_logout_uri?: string | undefined;
414
- client_name?: string | undefined;
415
- grant_types?: string[] | undefined;
416
414
  jwks_uri?: string | undefined;
417
415
  post_logout_redirect_uris?: string[] | undefined;
418
416
  redirect_uris?: string[] | undefined;
417
+ client_name?: string | undefined;
418
+ grant_types?: string[] | undefined;
419
419
  };
420
420
  params: {
421
421
  clientId: string;
@@ -12,7 +12,8 @@ The application owns user records. The auth package owns credentials and session
12
12
 
13
13
  ```ts
14
14
  import { auth } from '@absolutejs/auth/server';
15
- import { createPostgresAuthSessionStore, createPostgresCredentialStore, runMigrations } from '@absolutejs/auth';
15
+ import { runBunMigrations } from '@absolutejs/auth/bun';
16
+ import { createPostgresAuthSessionStore, createPostgresCredentialStore } from '@absolutejs/auth';
16
17
  import { SQL } from 'bun';
17
18
  import { Database } from 'bun:sqlite';
18
19
  import { drizzle } from 'drizzle-orm/bun-sql';
@@ -25,20 +26,11 @@ if (!databaseUrl)
25
26
  throw new Error(
26
27
  "AUTH_DATABASE_URL must point to the isolated acceptance database",
27
28
  );
28
- const migrationClient = new SQL({ url: databaseUrl, max: 1, prepare: false });
29
- try {
30
- await runMigrations({
31
- blocks: ["sessions", "credentials"],
32
- client: {
33
- query: async (text, values) => ({
34
- rows: await migrationClient.unsafe(text, values ? [...values] : []),
35
- }),
36
- },
37
- log: () => undefined,
38
- });
39
- } finally {
40
- await migrationClient.close();
41
- }
29
+ await runBunMigrations({
30
+ databaseUrl,
31
+ blocks: ['sessions', 'credentials'],
32
+ log: () => undefined,
33
+ });
42
34
  const authDb = drizzle({ client: new SQL(databaseUrl) });
43
35
  const decodeCustomer = (value: unknown): Customer => {
44
36
  if (typeof value !== "object" || value === null)
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.82.0",
2
+ "version": "0.83.0",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "license": "BSL-1.1",
18
18
  "author": "Alex Kahn",
19
19
  "scripts": {
20
- "build": "rm -rf dist && bun build src/index.ts src/server.ts src/agents/index.ts src/oidc/index.ts src/saml.ts src/webauthn.ts src/htmx/index.ts src/client/index.ts src/client/mobile.ts src/client/react.ts src/client/vue.ts src/client/solid.ts src/client/svelte.ts src/plugins/index.ts src/providers/index.ts src/linkedProviders/index.ts src/vault/index.ts src/manifest.ts --root src --outdir dist --sourcemap --target=bun --external elysia --external react --external vue --external solid-js --external svelte --external @opentelemetry/api --external @simplewebauthn/browser --external @simplewebauthn/server --external @node-saml/node-saml && bun build src/cli/migrate.ts --outdir dist/cli --sourcemap --target=bun --external @neondatabase/serverless --external drizzle-orm && bun build src/fingerprint-client/index.ts --outdir dist/fingerprint-client --sourcemap --target=browser && bun run scripts/emitDeclarations.ts && chmod +x dist/cli/migrate.js && absolute-manifest emit",
20
+ "build": "rm -rf dist && bun build src/bun.ts src/index.ts src/server.ts src/agents/index.ts src/oidc/index.ts src/saml.ts src/webauthn.ts src/htmx/index.ts src/client/index.ts src/client/mobile.ts src/client/react.ts src/client/vue.ts src/client/solid.ts src/client/svelte.ts src/plugins/index.ts src/providers/index.ts src/linkedProviders/index.ts src/vault/index.ts src/manifest.ts --root src --outdir dist --sourcemap --target=bun --external elysia --external react --external vue --external solid-js --external svelte --external @opentelemetry/api --external @simplewebauthn/browser --external @simplewebauthn/server --external @node-saml/node-saml && bun build src/cli/migrate.ts --outdir dist/cli --sourcemap --target=bun --external @neondatabase/serverless --external drizzle-orm && bun build src/fingerprint-client/index.ts --outdir dist/fingerprint-client --sourcemap --target=browser && bun run scripts/emitDeclarations.ts && chmod +x dist/cli/migrate.js && absolute-manifest emit",
21
21
  "config": "absolute config",
22
22
  "test": "bun test",
23
23
  "format": "absolute prettier --write",
@@ -201,7 +201,12 @@
201
201
  "import": "./dist/manifest.js",
202
202
  "default": "./dist/manifest.js"
203
203
  },
204
- "./manifest.json": "./dist/manifest.json"
204
+ "./manifest.json": "./dist/manifest.json",
205
+ "./bun": {
206
+ "types": "./dist/bun.d.ts",
207
+ "import": "./dist/bun.js",
208
+ "require": "./dist/bun.js"
209
+ }
205
210
  },
206
211
  "type": "module",
207
212
  "files": [