@aura-stack/auth 0.3.0 → 0.4.0-rc.2

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.
@@ -1,12 +1,34 @@
1
1
  import * as _aura_stack_router from '@aura-stack/router';
2
+ import { z } from 'zod';
2
3
  import { j as OAuthProviderRecord } from '../../index-DkaLJFn8.js';
3
- import 'zod';
4
4
  import '../../schemas.js';
5
5
  import '@aura-stack/router/cookie';
6
6
  import '@aura-stack/jose';
7
7
  import '@aura-stack/jose/jose';
8
8
  import '../../@types/utility.js';
9
9
 
10
- declare const callbackAction: (oauth: OAuthProviderRecord) => _aura_stack_router.RouteEndpoint<"GET", "/callback/:oauth", {}>;
10
+ declare const callbackAction: (oauth: OAuthProviderRecord) => _aura_stack_router.RouteEndpoint<"GET", "/callback/:oauth", {
11
+ schemas?: {
12
+ params: z.ZodObject<{
13
+ oauth: z.ZodEnum<{
14
+ [x: string & Record<never, never>]: string & Record<never, never>;
15
+ github: "github";
16
+ bitbucket: "bitbucket";
17
+ figma: "figma";
18
+ discord: "discord";
19
+ gitlab: "gitlab";
20
+ spotify: "spotify";
21
+ x: "x";
22
+ strava: "strava";
23
+ mailchimp: "mailchimp";
24
+ pinterest: "pinterest";
25
+ }>;
26
+ }, z.core.$strip>;
27
+ searchParams: z.ZodObject<{
28
+ code: z.ZodString;
29
+ state: z.ZodString;
30
+ }, z.core.$strip>;
31
+ } | undefined;
32
+ }>;
11
33
 
12
34
  export { callbackAction };
@@ -1,5 +1,7 @@
1
1
  import * as _aura_stack_router from '@aura-stack/router';
2
2
 
3
- declare const csrfTokenAction: _aura_stack_router.RouteEndpoint<"GET", "/csrfToken", {}>;
3
+ declare const csrfTokenAction: _aura_stack_router.RouteEndpoint<"GET", "/csrfToken", {
4
+ schemas?: _aura_stack_router.EndpointSchemas | undefined;
5
+ }>;
4
6
 
5
7
  export { csrfTokenAction };
@@ -4,8 +4,8 @@ export { sessionAction } from './session/session.js';
4
4
  export { signOutAction } from './signOut/signOut.js';
5
5
  export { csrfTokenAction } from './csrfToken/csrfToken.js';
6
6
  import '@aura-stack/router';
7
- import '../index-DkaLJFn8.js';
8
7
  import 'zod';
8
+ import '../index-DkaLJFn8.js';
9
9
  import '../schemas.js';
10
10
  import '@aura-stack/router/cookie';
11
11
  import '@aura-stack/jose';
@@ -2,9 +2,6 @@ import "../chunk-ITQ7352M.js";
2
2
  import {
3
3
  signOutAction
4
4
  } from "../chunk-A3N4PVAT.js";
5
- import {
6
- csrfTokenAction
7
- } from "../chunk-HT4YLL7N.js";
8
5
  import {
9
6
  callbackAction
10
7
  } from "../chunk-KSWLO5ZU.js";
@@ -13,6 +10,9 @@ import "../chunk-IVET23KF.js";
13
10
  import {
14
11
  sessionAction
15
12
  } from "../chunk-JVFTCTTE.js";
13
+ import {
14
+ csrfTokenAction
15
+ } from "../chunk-HT4YLL7N.js";
16
16
  import {
17
17
  signInAction
18
18
  } from "../chunk-3EUWD5BB.js";
@@ -1,5 +1,7 @@
1
1
  import * as _aura_stack_router from '@aura-stack/router';
2
2
 
3
- declare const sessionAction: _aura_stack_router.RouteEndpoint<"GET", "/session", {}>;
3
+ declare const sessionAction: _aura_stack_router.RouteEndpoint<"GET", "/session", {
4
+ schemas?: _aura_stack_router.EndpointSchemas | undefined;
5
+ }>;
4
6
 
5
7
  export { sessionAction };
@@ -1,12 +1,33 @@
1
1
  import * as _aura_stack_router from '@aura-stack/router';
2
+ import { z } from 'zod';
2
3
  import { j as OAuthProviderRecord } from '../../index-DkaLJFn8.js';
3
- import 'zod';
4
4
  import '../../schemas.js';
5
5
  import '@aura-stack/router/cookie';
6
6
  import '@aura-stack/jose';
7
7
  import '@aura-stack/jose/jose';
8
8
  import '../../@types/utility.js';
9
9
 
10
- declare const signInAction: (oauth: OAuthProviderRecord) => _aura_stack_router.RouteEndpoint<"GET", "/signIn/:oauth", {}>;
10
+ declare const signInAction: (oauth: OAuthProviderRecord) => _aura_stack_router.RouteEndpoint<"GET", "/signIn/:oauth", {
11
+ schemas?: {
12
+ params: z.ZodObject<{
13
+ oauth: z.ZodEnum<{
14
+ [x: string & Record<never, never>]: string & Record<never, never>;
15
+ github: "github";
16
+ bitbucket: "bitbucket";
17
+ figma: "figma";
18
+ discord: "discord";
19
+ gitlab: "gitlab";
20
+ spotify: "spotify";
21
+ x: "x";
22
+ strava: "strava";
23
+ mailchimp: "mailchimp";
24
+ pinterest: "pinterest";
25
+ }>;
26
+ }, z.core.$strip>;
27
+ searchParams: z.ZodObject<{
28
+ redirectTo: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ } | undefined;
31
+ }>;
11
32
 
12
33
  export { signInAction };
@@ -1,8 +1,16 @@
1
1
  import * as _aura_stack_router from '@aura-stack/router';
2
+ import { z } from 'zod';
2
3
 
3
4
  /**
4
5
  * @see https://datatracker.ietf.org/doc/html/rfc7009
5
6
  */
6
- declare const signOutAction: _aura_stack_router.RouteEndpoint<"POST", "/signOut", {}>;
7
+ declare const signOutAction: _aura_stack_router.RouteEndpoint<"POST", "/signOut", {
8
+ schemas?: {
9
+ searchParams: z.ZodObject<{
10
+ token_type_hint: z.ZodLiteral<"session_token">;
11
+ redirectTo: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ } | undefined;
14
+ }>;
7
15
 
8
16
  export { signOutAction };
package/dist/index.cjs CHANGED
@@ -30,7 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
- createAuth: () => createAuth
33
+ createAuth: () => createAuth,
34
+ createClient: () => import_router7.createClient
34
35
  });
35
36
  module.exports = __toCommonJS(index_exports);
36
37
  var import_config2 = require("dotenv/config");
@@ -1188,5 +1189,6 @@ var createAuth = (authConfig) => {
1188
1189
  };
1189
1190
  // Annotate the CommonJS export names for ESM import in node:
1190
1191
  0 && (module.exports = {
1191
- createAuth
1192
+ createAuth,
1193
+ createClient
1192
1194
  });
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { d as AuthConfig, e as AuthInstance } from './index-DkaLJFn8.js';
2
- export { C as CookieConfig, E as ErrorType, f as JoseInstance, O as OAuthProvider, g as OAuthProviderConfig, h as OAuthProviderCredentials, S as Session, U as User } from './index-DkaLJFn8.js';
1
+ import { d as AuthConfig, e as AuthInstance, f as JoseInstance } from './index-DkaLJFn8.js';
2
+ export { C as CookieConfig, E as ErrorType, O as OAuthProvider, g as OAuthProviderConfig, h as OAuthProviderCredentials, S as Session, U as User } from './index-DkaLJFn8.js';
3
+ export { createClient } from '@aura-stack/router';
3
4
  import 'zod';
4
5
  import './schemas.js';
5
6
  import '@aura-stack/router/cookie';
@@ -29,6 +30,9 @@ import './@types/utility.js';
29
30
  * }]
30
31
  * })
31
32
  */
32
- declare const createAuth: (authConfig: AuthConfig) => AuthInstance;
33
+ declare const createAuth: (authConfig: AuthConfig) => {
34
+ handlers: AuthInstance["handlers"];
35
+ jose: JoseInstance;
36
+ };
33
37
 
34
- export { AuthConfig, AuthInstance, createAuth };
38
+ export { AuthConfig, AuthInstance, JoseInstance, createAuth };
package/dist/index.js CHANGED
@@ -13,9 +13,6 @@ import "./chunk-ITQ7352M.js";
13
13
  import {
14
14
  signOutAction
15
15
  } from "./chunk-A3N4PVAT.js";
16
- import {
17
- csrfTokenAction
18
- } from "./chunk-HT4YLL7N.js";
19
16
  import {
20
17
  callbackAction
21
18
  } from "./chunk-KSWLO5ZU.js";
@@ -24,6 +21,9 @@ import "./chunk-IVET23KF.js";
24
21
  import {
25
22
  sessionAction
26
23
  } from "./chunk-JVFTCTTE.js";
24
+ import {
25
+ csrfTokenAction
26
+ } from "./chunk-HT4YLL7N.js";
27
27
  import {
28
28
  signInAction
29
29
  } from "./chunk-3EUWD5BB.js";
@@ -49,7 +49,7 @@ import "./chunk-YRCB5FLE.js";
49
49
 
50
50
  // src/index.ts
51
51
  import "dotenv/config";
52
- import { createRouter } from "@aura-stack/router";
52
+ import { createRouter, createClient } from "@aura-stack/router";
53
53
  var createInternalConfig = (authConfig) => {
54
54
  const useSecure = authConfig?.trustedProxyHeaders ?? false;
55
55
  return {
@@ -85,5 +85,6 @@ var createAuth = (authConfig) => {
85
85
  };
86
86
  };
87
87
  export {
88
- createAuth
88
+ createAuth,
89
+ createClient
89
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aura-stack/auth",
3
- "version": "0.3.0",
3
+ "version": "0.4.0-rc.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Core auth for @aura-stack/auth",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
- "@aura-stack/router": "^0.5.0",
47
+ "@aura-stack/router": "0.6.0-rc.1",
48
48
  "dotenv": "^17.2.3",
49
49
  "zod": "^4.3.5",
50
50
  "@aura-stack/jose": "0.2.0"