@fitzzero/quickdraw-core 5.1.1 → 5.1.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.
- package/README.md +533 -180
- package/dist/{admin-DKwkIh5i.d.ts → admin-DWWrT1h6.d.ts} +2 -2
- package/dist/{adminSchemas-2DUA_hZ8.d.ts → adminSchemas-D4bFKsrb.d.ts} +6 -4
- package/dist/{auth-BhWqdyb-.d.ts → auth-DXiSJZaf.d.ts} +42 -16
- package/dist/{caller-CXTFswBO.d.ts → caller-BT-Mv4bD.d.ts} +117 -22
- package/dist/{chunk-RT6OILOI.js → chunk-4D2DOGAW.js} +2 -14
- package/dist/chunk-4D2DOGAW.js.map +1 -0
- package/dist/chunk-5CGO426C.js +15 -0
- package/dist/chunk-5CGO426C.js.map +1 -0
- package/dist/{chunk-RZTP4IEW.js → chunk-6K5BY47X.js} +4594 -3481
- package/dist/chunk-6K5BY47X.js.map +1 -0
- package/dist/{chunk-VSQBHPWH.js → chunk-753VJIUP.js} +13 -15
- package/dist/chunk-753VJIUP.js.map +1 -0
- package/dist/{chunk-ZIVPHYRG.js → chunk-7QCUX4TK.js} +4 -4
- package/dist/chunk-7QCUX4TK.js.map +1 -0
- package/dist/chunk-AK23XSWD.js +16 -0
- package/dist/chunk-AK23XSWD.js.map +1 -0
- package/dist/{chunk-SHEGLZEP.js → chunk-AONAFOYU.js} +14 -5
- package/dist/{chunk-SHEGLZEP.js.map → chunk-AONAFOYU.js.map} +1 -1
- package/dist/chunk-DKE6QO26.js +136 -0
- package/dist/chunk-DKE6QO26.js.map +1 -0
- package/dist/{chunk-H23KEFBA.js → chunk-DUBU3BB3.js} +30 -1
- package/dist/chunk-DUBU3BB3.js.map +1 -0
- package/dist/{chunk-CDKG4TFA.js → chunk-GKH3LJ7N.js} +1 -1
- package/dist/chunk-GKH3LJ7N.js.map +1 -0
- package/dist/{chunk-OECZPRPW.js → chunk-GSIPUNJL.js} +49 -9
- package/dist/chunk-GSIPUNJL.js.map +1 -0
- package/dist/{chunk-DD4SKCNO.js → chunk-LCC7HNFP.js} +12 -1
- package/dist/chunk-LCC7HNFP.js.map +1 -0
- package/dist/{chunk-2PWMUVC7.js → chunk-MBH6IDSM.js} +480 -12
- package/dist/chunk-MBH6IDSM.js.map +1 -0
- package/dist/{chunk-QCHKWIRS.js → chunk-NMXYENH4.js} +10 -10
- package/dist/{chunk-QCHKWIRS.js.map → chunk-NMXYENH4.js.map} +1 -1
- package/dist/chunk-NO4M6PO5.js +101 -0
- package/dist/chunk-NO4M6PO5.js.map +1 -0
- package/dist/{chunk-TBMKJ26R.js → chunk-NW6U45HX.js} +3 -1
- package/dist/chunk-NW6U45HX.js.map +1 -0
- package/dist/{chunk-REX5YPHX.js → chunk-RJ5I2VO3.js} +74 -19
- package/dist/chunk-RJ5I2VO3.js.map +1 -0
- package/dist/{chunk-QEKVYG5F.js → chunk-RL4VKLBX.js} +1 -1
- package/dist/{chunk-QEKVYG5F.js.map → chunk-RL4VKLBX.js.map} +1 -1
- package/dist/chunk-XH2IZVLT.js +62 -0
- package/dist/chunk-XH2IZVLT.js.map +1 -0
- package/dist/{chunk-4DIQHASK.js → chunk-Z5ILULF2.js} +26 -7
- package/dist/chunk-Z5ILULF2.js.map +1 -0
- package/dist/cli/quickdraw-docs.js +5 -3
- package/dist/cli/quickdraw-docs.js.map +1 -1
- package/dist/client/index.d.ts +30 -18
- package/dist/client/index.js +8 -6
- package/dist/client/index.js.map +1 -1
- package/dist/{clientTypes-Bc-G8n-U.d.ts → clientTypes-hWcPUVS9.d.ts} +3 -3
- package/dist/{connection-Cr1BU07W.d.ts → connection-CgijdGpT.d.ts} +8 -4
- package/dist/{createServer-CP9eDHZZ.d.ts → createServer-Cp-Wk500.d.ts} +36 -14
- package/dist/{createTestApp-UKVGEmOf.d.ts → createTestApp-BB_PkqQ7.d.ts} +16 -10
- package/dist/{envelope-Cp3YcVxC.d.ts → envelope-DzWyIXjj.d.ts} +18 -4
- package/dist/{http-Djj2Inuu.d.ts → http-DotQ5bj8.d.ts} +68 -17
- package/dist/index.d.ts +7 -7
- package/dist/index.js +37 -13
- package/dist/index.js.map +1 -1
- package/dist/{infer-Teo1xpsd.d.ts → infer-BmoZsL9a.d.ts} +43 -10
- package/dist/logger-Yz93KzdV.d.ts +30 -0
- package/dist/{metrics-BdBu5o8G.d.ts → metrics-DW80Exve.d.ts} +2 -2
- package/dist/origins-kvpxnVcW.d.ts +8 -0
- package/dist/prisma/index.d.ts +5 -5
- package/dist/prisma/index.js +130 -67
- package/dist/prisma/index.js.map +1 -1
- package/dist/{rateLimit-ZMIZJUZF.js → rateLimit-5RKBFLUR.js} +2 -2
- package/dist/server/auth/index.d.ts +82 -33
- package/dist/server/auth/index.js +273 -268
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/express/index.d.ts +9 -2
- package/dist/server/express/index.js +1 -1
- package/dist/server/index.d.ts +147 -67
- package/dist/server/index.js +520 -381
- package/dist/server/index.js.map +1 -1
- package/dist/server/mcp/index.d.ts +63 -17
- package/dist/server/mcp/index.js +256 -54
- package/dist/server/mcp/index.js.map +1 -1
- package/dist/server/otel.d.ts +3 -3
- package/dist/{sharing-DVa8W-yR.d.ts → sharing-UDLn1049.d.ts} +3 -3
- package/dist/testing/client.d.ts +14 -14
- package/dist/testing/client.js +9 -7
- package/dist/testing/client.js.map +1 -1
- package/dist/testing/index.d.ts +12 -12
- package/dist/testing/index.js +21 -12
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/mock.d.ts +5 -5
- package/dist/testing/mock.js +8 -6
- package/dist/{types-Cu0vmx7c.d.ts → types-CYliTP65.d.ts} +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-2PWMUVC7.js.map +0 -1
- package/dist/chunk-4DIQHASK.js.map +0 -1
- package/dist/chunk-CDKG4TFA.js.map +0 -1
- package/dist/chunk-DD4SKCNO.js.map +0 -1
- package/dist/chunk-H23KEFBA.js.map +0 -1
- package/dist/chunk-OECZPRPW.js.map +0 -1
- package/dist/chunk-REX5YPHX.js.map +0 -1
- package/dist/chunk-RT6OILOI.js.map +0 -1
- package/dist/chunk-RZTP4IEW.js.map +0 -1
- package/dist/chunk-TBMKJ26R.js.map +0 -1
- package/dist/chunk-VSQBHPWH.js.map +0 -1
- package/dist/chunk-YSWH776Y.js +0 -13
- package/dist/chunk-YSWH776Y.js.map +0 -1
- package/dist/chunk-ZIVPHYRG.js.map +0 -1
- package/dist/logger-BY28acW-.d.ts +0 -16
- /package/dist/{rateLimit-ZMIZJUZF.js.map → rateLimit-5RKBFLUR.js.map} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { L as Logger } from '../../logger-
|
|
1
|
+
import { L as Logger } from '../../logger-Yz93KzdV.js';
|
|
2
2
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
-
import { M as MaybePromise, P as Principal } from '../../types-
|
|
4
|
-
import {
|
|
5
|
-
import '../../
|
|
3
|
+
import { M as MaybePromise, P as Principal } from '../../types-CYliTP65.js';
|
|
4
|
+
import { A as AllowedOrigin } from '../../origins-kvpxnVcW.js';
|
|
5
|
+
import { b as AuthenticateRequest, H as HttpRequest } from '../../auth-DXiSJZaf.js';
|
|
6
|
+
import '../../infer-BmoZsL9a.js';
|
|
6
7
|
import 'socket.io';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -60,10 +61,11 @@ interface SessionCookieOptions {
|
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
63
|
* Sets the session cookie, under the name {@link sessionCookieNameFor} gives
|
|
63
|
-
* the response's request, so `socketAuth` and the HTTP transport read it
|
|
64
|
+
* the response's request, so `socketAuth` and the HTTP transport read it,
|
|
65
|
+
* and clears a stale `__Host-session` that would shadow it.
|
|
64
66
|
*/
|
|
65
67
|
declare function setSessionCookie(res: CookieResponse, jwt: string, options?: SessionCookieOptions): void;
|
|
66
|
-
/** Clears the session cookie `setSessionCookie` sets on the same request. */
|
|
68
|
+
/** Clears the session cookie `setSessionCookie` sets on the same request, and a stale `__Host-session` beside it. */
|
|
67
69
|
declare function clearSessionCookie(res: CookieResponse, options?: SessionCookieOptions): void;
|
|
68
70
|
|
|
69
71
|
interface JWTPayload {
|
|
@@ -86,7 +88,13 @@ interface JWTPayload {
|
|
|
86
88
|
*/
|
|
87
89
|
declare function createJWT(payload: Omit<JWTPayload, "exp" | "iat">, secret: string, expiresIn?: string): Promise<string>;
|
|
88
90
|
/**
|
|
89
|
-
* Verify and decode a JWT token.
|
|
91
|
+
* Verify and decode a JWT token: its signature and expiry, nothing more.
|
|
92
|
+
* It is never a session check: a token of a session that was signed out,
|
|
93
|
+
* logged out everywhere or revoked still verifies until the JWT expires (7
|
|
94
|
+
* days by default). Check a session token with `liveSession({ sessions,
|
|
95
|
+
* jwtSecret }, token)`, `bearerAuth(...)` or `socketAuth(...)`, which ask the
|
|
96
|
+
* session store on every call. In development it warns once per process
|
|
97
|
+
* when it verifies a token that carries a session (`sid`).
|
|
90
98
|
*
|
|
91
99
|
* @param token - The JWT token to verify
|
|
92
100
|
* @param secret - The secret key for verification
|
|
@@ -190,10 +198,12 @@ declare const googleProvider: OAuthProvider<GoogleUser>;
|
|
|
190
198
|
* via `registerMockOAuthProvider`. Users are supplied by the app (typically
|
|
191
199
|
* seeded demo accounts); no real credentials are involved.
|
|
192
200
|
*
|
|
193
|
-
*
|
|
194
|
-
* "
|
|
195
|
-
* NODE_ENV
|
|
196
|
-
*
|
|
201
|
+
* Development only: routes are mounted only when ENABLE_MOCK_OAUTH is
|
|
202
|
+
* "true" and NODE_ENV is "development" or "test" (an allowlist: an unset
|
|
203
|
+
* NODE_ENV, "prod" or "staging" mount nothing, the 5.1 audit's AUTH-3), every
|
|
204
|
+
* handler re-checks NODE_ENV at request time, and mounting them logs a
|
|
205
|
+
* warning. Apps should add a third layer and refuse to boot outside
|
|
206
|
+
* development with the flag set.
|
|
197
207
|
*/
|
|
198
208
|
|
|
199
209
|
interface MockOAuthUser {
|
|
@@ -203,6 +213,7 @@ interface MockOAuthUser {
|
|
|
203
213
|
picture?: string | null;
|
|
204
214
|
}
|
|
205
215
|
declare const DEFAULT_MOCK_PATH_PREFIX = "/auth/mock/provider";
|
|
216
|
+
/** True when ENABLE_MOCK_OAUTH is "true" and NODE_ENV is "development" or "test". */
|
|
206
217
|
declare function isMockOAuthEnabled(): boolean;
|
|
207
218
|
interface MockOAuthProviderOptions {
|
|
208
219
|
/**
|
|
@@ -259,8 +270,9 @@ interface RegisterMockOAuthOptions {
|
|
|
259
270
|
* Mount the mock OAuth provider endpoints (authorize, token, userinfo) on an
|
|
260
271
|
* Express-compatible router.
|
|
261
272
|
*
|
|
262
|
-
* No-ops (returning false) unless `isMockOAuthEnabled()` — i.e.
|
|
263
|
-
*
|
|
273
|
+
* No-ops (returning false) unless `isMockOAuthEnabled()` — i.e. without
|
|
274
|
+
* ENABLE_MOCK_OAUTH=true, or unless NODE_ENV is development or test, the
|
|
275
|
+
* routes are never mounted. Mounting them logs a warning.
|
|
264
276
|
*/
|
|
265
277
|
declare function registerMockOAuthProvider(router: MockOAuthRouter, options: RegisterMockOAuthOptions): boolean;
|
|
266
278
|
|
|
@@ -351,8 +363,8 @@ interface RequireAuthOptions {
|
|
|
351
363
|
/**
|
|
352
364
|
* Cookie to read the JWT from. Default: the names `setSessionCookie` and
|
|
353
365
|
* the auth routes set on the same request (`sessionCookieNamesFor`):
|
|
354
|
-
* `__Host-session` over HTTPS, `session`
|
|
355
|
-
*
|
|
366
|
+
* `__Host-session` over HTTPS, `__Host-session` then `session` over plain
|
|
367
|
+
* HTTP or when `COOKIE_DOMAIN` is set.
|
|
356
368
|
*/
|
|
357
369
|
cookieName?: string;
|
|
358
370
|
}
|
|
@@ -385,13 +397,6 @@ interface AuthRouteRequest extends IncomingMessage {
|
|
|
385
397
|
/** The response the routes answer: Express's, which also sets cookies. */
|
|
386
398
|
type AuthRouteResponse = ServerResponse & CookieResponse;
|
|
387
399
|
|
|
388
|
-
/**
|
|
389
|
-
* An allowed origin: exact (`"https://app.example.com"`), or a pattern over
|
|
390
|
-
* whole origins, anchored at both ends
|
|
391
|
-
* (`/^https:\/\/[a-z0-9-]+\.preview\.example\.com$/`).
|
|
392
|
-
*/
|
|
393
|
-
type AllowedOrigin = string | RegExp;
|
|
394
|
-
|
|
395
400
|
/** The cookie that carries a sign-in in progress, on a request that is not secure. */
|
|
396
401
|
declare const OAUTH_STATE_COOKIE = "qd_oauth";
|
|
397
402
|
/**
|
|
@@ -607,7 +612,8 @@ declare namespace discord {
|
|
|
607
612
|
* The development sign-in: a picker of the app's demo users, served by the
|
|
608
613
|
* routes through `registerMockOAuthProvider`. Left out (its routes answer
|
|
609
614
|
* nothing) unless `isMockOAuthEnabled()`: `ENABLE_MOCK_OAUTH=true` and
|
|
610
|
-
* `NODE_ENV`
|
|
615
|
+
* `NODE_ENV` `development` or `test` (an unset `NODE_ENV` leaves it out: set
|
|
616
|
+
* `NODE_ENV=development`). Mounting it logs a warning.
|
|
611
617
|
*/
|
|
612
618
|
declare function mock(options: MockSignInOptions): MockSignInProvider;
|
|
613
619
|
|
|
@@ -767,8 +773,8 @@ interface SocketAuthOptions<P extends Principal = Principal> {
|
|
|
767
773
|
* The session cookie's name. Default: the name the auth routes set on the
|
|
768
774
|
* same handshake: `"session"` when `COOKIE_DOMAIN` gives the cookie a
|
|
769
775
|
* domain; else `"__Host-session"` over HTTPS, where the plain name a
|
|
770
|
-
* sibling site could plant is never read, and `"session"`
|
|
771
|
-
* `"__Host-session"`
|
|
776
|
+
* sibling site could plant is never read, and `"session"` over plain HTTP,
|
|
777
|
+
* where `"__Host-session"` is read first all the same. A name given here is the only one
|
|
772
778
|
* read, on any handshake: give the routes' `cookie.name` here, or
|
|
773
779
|
* `"session"` when their `cookie.domain` is set without `COOKIE_DOMAIN`. A
|
|
774
780
|
* name the handshake repeats counts as no credential.
|
|
@@ -785,9 +791,11 @@ interface SocketAuthOptions<P extends Principal = Principal> {
|
|
|
785
791
|
* Development sign-in without a session: a socket whose handshake carries
|
|
786
792
|
* `auth: { userId }` and no token is that user, as this function answers:
|
|
787
793
|
* their principal (its `userId` the one named), or `null` to refuse the
|
|
788
|
-
* handshake (an unknown id). For a game editor or load-test bots.
|
|
789
|
-
*
|
|
790
|
-
*
|
|
794
|
+
* handshake (an unknown id). For a game editor or load-test bots. Only
|
|
795
|
+
* while `NODE_ENV` is `development` or `test`: `socketAuth` throws when it
|
|
796
|
+
* is given otherwise (an unset `NODE_ENV` included: set
|
|
797
|
+
* `NODE_ENV=development`), refuses such a handshake once `NODE_ENV` says
|
|
798
|
+
* otherwise, and `createServer` warns at startup while it is on. HTTP calls
|
|
791
799
|
* never use it. Pass it only when the app's own flag is on:
|
|
792
800
|
* `devCredentials: env.ENABLE_DEV_CREDENTIALS ? findDevUser : undefined`.
|
|
793
801
|
*/
|
|
@@ -813,13 +821,19 @@ interface CookieOriginRequest {
|
|
|
813
821
|
* `Sec-Fetch-Site` names another site, and a socket handshake only when
|
|
814
822
|
* `Sec-Fetch-Site` is `same-origin` or with `allowMissingOrigin`. A bearer
|
|
815
823
|
* token is not ambient: check only a credential that came from the cookie
|
|
816
|
-
* (`request.
|
|
824
|
+
* (`request.sessionCookie` on an HTTP `authenticate` request, where the
|
|
825
|
+
* transport hands an `authenticate` other than socketAuth's the cookie; it is
|
|
826
|
+
* in `auth.token` only for socketAuth's). Then check the session against the
|
|
827
|
+
* store, on every call (`liveSession`).
|
|
817
828
|
*
|
|
818
829
|
* @example
|
|
819
830
|
* authenticate: async (request) => {
|
|
820
|
-
* if (request.transport === "http" && request.
|
|
821
|
-
*
|
|
822
|
-
*
|
|
831
|
+
* if (request.transport === "http" && request.sessionCookie !== undefined) {
|
|
832
|
+
* if (!cookieOriginAllowed(request, allowedOrigins)) {
|
|
833
|
+
* throw new QuickdrawError("FORBIDDEN", "This page may not use the session cookie");
|
|
834
|
+
* }
|
|
835
|
+
* const session = await liveSession({ sessions, jwtSecret }, request.sessionCookie);
|
|
836
|
+
* // ...
|
|
823
837
|
* }
|
|
824
838
|
* // ...
|
|
825
839
|
* }
|
|
@@ -836,6 +850,41 @@ declare function socketAuth<P extends Principal>(options: SocketAuthOptions<P> &
|
|
|
836
850
|
}): SessionAuthenticate<P>;
|
|
837
851
|
declare function socketAuth(options: SocketAuthOptions): SessionAuthenticate<Principal>;
|
|
838
852
|
|
|
853
|
+
/** Options of {@link bearerAuth}: the auth routes' session store and secret, and how a principal is built. */
|
|
854
|
+
interface BearerAuthOptions<P extends Principal = Principal> extends SessionKeys {
|
|
855
|
+
/**
|
|
856
|
+
* Builds the principal of a session's user, for example `kind: "agent"`
|
|
857
|
+
* for an MCP caller; its `userId` must be the session's. Default
|
|
858
|
+
* `{ userId, kind: "user" }`.
|
|
859
|
+
*/
|
|
860
|
+
readonly loadPrincipal?: PrincipalLoader<P>;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* What {@link bearerAuth} returns: the principal a bearer token signs in,
|
|
864
|
+
* `null` for no token, and a rejection (`UNAUTHENTICATED`) for a token that
|
|
865
|
+
* is not a live session's.
|
|
866
|
+
*/
|
|
867
|
+
type BearerAuthenticate<P extends Principal> = (token: unknown) => Promise<P | null>;
|
|
868
|
+
/**
|
|
869
|
+
* Checks bearer tokens against the auth routes' sessions, on every call: no
|
|
870
|
+
* token (anything but a non-empty string) is anonymous (`null`); a token
|
|
871
|
+
* whose session was signed out, revoked or has expired, or a JWT without a
|
|
872
|
+
* session, is refused with `UNAUTHENTICATED`; a live session's token is its
|
|
873
|
+
* user's principal, built as `socketAuth` builds it. It records no socket
|
|
874
|
+
* session: for `createServer`'s `authenticate` use `socketAuth`.
|
|
875
|
+
*
|
|
876
|
+
* @example
|
|
877
|
+
* const verifySession = bearerAuth({ sessions, jwtSecret, loadPrincipal: (userId) => ({ userId, kind: "agent" }) });
|
|
878
|
+
* // the MCP bridge's principal hook
|
|
879
|
+
* createMcpRegistry({ ..., principal: (request) => verifySession(request.transport === "http" ? request.token : process.env.AGENT_TOKEN) });
|
|
880
|
+
* // an authenticate that takes bearer tokens only
|
|
881
|
+
* createHttpRouter({ dispatcher, auth: { authenticate: ({ auth }) => verifySession(auth.token) } });
|
|
882
|
+
*/
|
|
883
|
+
declare function bearerAuth<P extends Principal>(options: BearerAuthOptions<P> & {
|
|
884
|
+
readonly loadPrincipal: PrincipalLoader<P>;
|
|
885
|
+
}): BearerAuthenticate<P>;
|
|
886
|
+
declare function bearerAuth(options: BearerAuthOptions): BearerAuthenticate<Principal>;
|
|
887
|
+
|
|
839
888
|
/** Options of {@link requireSession}. */
|
|
840
889
|
interface RequireSessionOptions<P extends Principal = Principal> {
|
|
841
890
|
/**
|
|
@@ -927,4 +976,4 @@ declare function requireSession(keys: SessionKeys, options?: RequireSessionOptio
|
|
|
927
976
|
*/
|
|
928
977
|
declare function sessionOf<P extends Principal = Principal>(req: object): RequestSession<P>;
|
|
929
978
|
|
|
930
|
-
export {
|
|
979
|
+
export { AllowedOrigin, type AuthCookieOptions, type AuthMiddleware, type AuthProfile, type AuthProvider, type AuthProviderInfo, type AuthRateLimits, type AuthRequest, type AuthResponse, type AuthRouteRequest, type AuthRouteResponse, type AuthRoutes, type AuthRoutesOptions, type AuthSession, type BearerAuthOptions, type BearerAuthenticate, type CookieOriginRequest, type CookieResponse, type CookieSettings, DEFAULT_MOCK_PATH_PREFIX, DEFAULT_SESSION_TTL_MS, type DevCredentials, type DiscordUser, GUEST_MAX_BODY_BYTES, type GoogleUser, type GuestOptions, type GuestProvider, type GuestUser, HOST_OAUTH_STATE_COOKIE, HOST_SESSION_COOKIE, type IssuedSession, type JWTPayload, MIN_JWT_SECRET_LENGTH, type MemorySessionStore, type MockOAuthProviderOptions, type MockOAuthRouter, type MockOAuthUser, type MockSignInOptions, type MockSignInProvider, OAUTH_RETURN_ORIGIN_COOKIE, OAUTH_STATE_COOKIE, OAUTH_STATE_TTL_MS, type OAuthClientOptions, type OAuthConfig, type OAuthProvider, type OAuthSignInProvider, type OAuthTokenResponse, type OptionalClientOptions, type PrincipalLoader, type RegisterMockOAuthOptions, type RequestSession, type RequireAuthOptions, type RequireSessionOptions, SESSION_COOKIE, type SessionAuthenticate, type SessionCookieOptions, type SessionKeys, type SessionMeta, type SessionMiddleware, type SessionRequest, type SessionStore, type SocketAuthOptions, type ValidateOriginOptions, bearerAuth, clearSessionCookie, cookieOriginAllowed, createAuthRoutes, createJWT, createMemorySessionStore, createMockOAuthProvider, createOAuthURL, createRequireAuth, discord, discordProvider, exchangeOAuthCode, extractBearerOrCookieToken, getDiscordAvatarUrl, google, googleProvider, guest, isMockOAuthEnabled, issueSession, liveSession, mock, registerMockOAuthProvider, requireSession, sessionOf, setSessionCookie, socketAuth, validateRedirectOrigin, verifyJWT };
|