@aura-stack/auth 0.1.0-rc.5 → 0.1.0-rc.7
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/@types/index.d.ts +1 -2
- package/dist/@types/router.d.d.ts +3 -4
- package/dist/@types/utility.d.ts +6 -2
- package/dist/actions/callback/access-token.d.ts +1 -2
- package/dist/actions/callback/callback.d.ts +1 -1
- package/dist/actions/callback/userinfo.d.ts +1 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/signIn/authorization.d.ts +1 -2
- package/dist/actions/signIn/signIn.d.ts +1 -1
- package/dist/cookie.d.ts +1 -2
- package/dist/error.d.ts +1 -2
- package/dist/{index-Cpe2d3w8.d.ts → index-DpfbvTZ_.d.ts} +20 -31
- package/dist/index.d.ts +2 -3
- package/dist/oauth/bitbucket.d.ts +1 -2
- package/dist/oauth/discord.d.ts +1 -2
- package/dist/oauth/figma.d.ts +1 -2
- package/dist/oauth/github.d.ts +1 -2
- package/dist/oauth/gitlab.d.ts +1 -2
- package/dist/oauth/index.d.ts +1 -2
- package/dist/oauth/spotify.d.ts +1 -2
- package/dist/oauth/x.d.ts +1 -2
- package/dist/secure.d.ts +1 -2
- package/package.json +2 -2
- package/dist/@types/index.d.cts +0 -8
- package/dist/@types/router.d.d.cts +0 -12
- package/dist/@types/utility.d.cts +0 -6
- package/dist/actions/callback/access-token.d.cts +0 -29
- package/dist/actions/callback/callback.d.cts +0 -12
- package/dist/actions/callback/userinfo.d.cts +0 -21
- package/dist/actions/csrfToken/csrfToken.d.cts +0 -5
- package/dist/actions/index.d.cts +0 -13
- package/dist/actions/session/session.d.cts +0 -5
- package/dist/actions/signIn/authorization.d.cts +0 -44
- package/dist/actions/signIn/signIn.d.cts +0 -12
- package/dist/actions/signOut/signOut.d.cts +0 -8
- package/dist/oauth/bitbucket.d.cts +0 -8
- package/dist/oauth/discord.d.cts +0 -8
- package/dist/oauth/figma.d.cts +0 -8
- package/dist/oauth/github.d.cts +0 -8
- package/dist/oauth/gitlab.d.cts +0 -8
- package/dist/oauth/index.d.cts +0 -8
- package/dist/oauth/spotify.d.cts +0 -8
- package/dist/oauth/x.d.cts +0 -8
package/dist/@types/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import 'zod/v4';
|
|
2
2
|
import '@aura-stack/jose/jose';
|
|
3
3
|
import '../schemas.js';
|
|
4
|
-
import '@aura-stack/router';
|
|
5
4
|
import 'cookie';
|
|
6
5
|
export { LiteralUnion, Prettify } from './utility.js';
|
|
7
|
-
export { y as AccessTokenError, c as AuthConfig, d as AuthInstance, A as AuthRuntimeConfig, w as AuthorizationError, C as CookieConfig, a as CookieConfigInternal, b as CookieName, u as CookieStrategyOptions, E as ErrorType, H as HostCookie,
|
|
6
|
+
export { y as AccessTokenError, c as AuthConfig, d as AuthInstance, A as AuthRuntimeConfig, w as AuthorizationError, C as CookieConfig, a as CookieConfigInternal, b as CookieName, u as CookieStrategyOptions, E as ErrorType, H as HostCookie, q as JWTStandardClaims, J as JoseInstance, v as OAuthError, O as OAuthProvider, e as OAuthProviderConfig, f as OAuthProviderCredentials, R as RouterGlobalContext, r as SecureCookie, S as Session, t as StandardCookie, T as TokenRevocationError, U as User } from '../index-DpfbvTZ_.js';
|
|
8
7
|
import 'zod/v4/core';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { R as RouterGlobalContext } from '../index-
|
|
1
|
+
import { R as RouterGlobalContext } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import './utility.js';
|
|
9
8
|
|
|
10
|
-
declare module "@aura-stack/router" {
|
|
11
|
-
interface GlobalContext extends RouterGlobalContext {}
|
|
9
|
+
declare module "@aura-stack/router" {
|
|
10
|
+
interface GlobalContext extends RouterGlobalContext {}
|
|
12
11
|
}
|
package/dist/@types/utility.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
type Prettify<T> = {
|
|
2
2
|
[K in keyof T]: T[K];
|
|
3
|
-
} & {
|
|
4
|
-
|
|
3
|
+
} & {
|
|
4
|
+
__aura_auth_prettify_brand?: never;
|
|
5
|
+
};
|
|
6
|
+
type LiteralUnion<T extends U, U = string> = (T | (U & Record<never, never>)) & {
|
|
7
|
+
__aura_auth_literal_union_brand?: never;
|
|
8
|
+
};
|
|
5
9
|
|
|
6
10
|
export type { LiteralUnion, Prettify };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as OAuthProviderCredentials } from '../../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../../@types/utility.js';
|
|
9
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aura_stack_router from '@aura-stack/router';
|
|
2
|
-
import { A as AuthRuntimeConfig } from '../../index-
|
|
2
|
+
import { A as AuthRuntimeConfig } from '../../index-DpfbvTZ_.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import '../../schemas.js';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as OAuthProviderCredentials, U as User } from '../../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../../@types/utility.js';
|
|
9
8
|
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ 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-
|
|
7
|
+
import '../index-DpfbvTZ_.js';
|
|
8
8
|
import 'zod/v4';
|
|
9
9
|
import '@aura-stack/jose/jose';
|
|
10
10
|
import '../schemas.js';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as OAuthProviderCredentials } from '../../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../../@types/utility.js';
|
|
9
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aura_stack_router from '@aura-stack/router';
|
|
2
|
-
import { A as AuthRuntimeConfig } from '../../index-
|
|
2
|
+
import { A as AuthRuntimeConfig } from '../../index-DpfbvTZ_.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import '../../schemas.js';
|
package/dist/cookie.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { SerializeOptions } from 'cookie';
|
|
2
2
|
export { parse } from 'cookie';
|
|
3
3
|
import { JWTPayload } from '@aura-stack/jose/jose';
|
|
4
|
-
import { C as CookieConfig, a as CookieConfigInternal, b as CookieName, A as AuthRuntimeConfig } from './index-
|
|
4
|
+
import { C as CookieConfig, a as CookieConfigInternal, b as CookieName, A as AuthRuntimeConfig } from './index-DpfbvTZ_.js';
|
|
5
5
|
import { LiteralUnion } from './@types/utility.js';
|
|
6
6
|
import 'zod/v4';
|
|
7
7
|
import './schemas.js';
|
|
8
8
|
import 'zod/v4/core';
|
|
9
|
-
import '@aura-stack/router';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Prefix for all cookies set by Aura Auth.
|
package/dist/error.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { E as ErrorType } from './index-
|
|
1
|
+
import { E as ErrorType } from './index-DpfbvTZ_.js';
|
|
2
2
|
import { LiteralUnion } from './@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import './schemas.js';
|
|
6
6
|
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
7
|
import 'cookie';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
import { JWTPayload } from '@aura-stack/jose/jose';
|
|
3
3
|
import { OAuthAuthorizationErrorResponse, OAuthAccessTokenErrorResponse } from './schemas.js';
|
|
4
|
-
import { Prettify, RoutePattern } from '@aura-stack/router';
|
|
5
4
|
import { SerializeOptions } from 'cookie';
|
|
6
|
-
import { LiteralUnion } from './@types/utility.js';
|
|
5
|
+
import { LiteralUnion, Prettify } from './@types/utility.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @see [X - Get my User](https://docs.x.com/x-api/users/get-my-user)
|
|
@@ -473,7 +472,7 @@ interface AuthConfig {
|
|
|
473
472
|
/**
|
|
474
473
|
* Base path for all authentication routes. Default is `/auth`.
|
|
475
474
|
*/
|
|
476
|
-
basePath?:
|
|
475
|
+
basePath?: `/${string}`;
|
|
477
476
|
/**
|
|
478
477
|
* Enable trusted proxy headers for scenarios where the application is behind a reverse proxy or load balancer.
|
|
479
478
|
* This setting allows Aura Auth to correctly interpret headers like `X-Forwarded-For` and `X-Forwarded-Proto`
|
|
@@ -490,16 +489,17 @@ interface AuthConfig {
|
|
|
490
489
|
*/
|
|
491
490
|
trustedProxyHeaders?: boolean;
|
|
492
491
|
}
|
|
493
|
-
|
|
492
|
+
interface JoseInstance {
|
|
494
493
|
decodeJWT: (token: string) => Promise<JWTPayload>;
|
|
495
494
|
encodeJWT: (payload: JWTPayload) => Promise<string>;
|
|
496
495
|
signJWS: (payload: JWTPayload) => Promise<string>;
|
|
497
496
|
verifyJWS: (payload: string) => Promise<JWTPayload>;
|
|
498
|
-
}
|
|
497
|
+
}
|
|
499
498
|
/**
|
|
500
499
|
* Internal runtime configuration used within Aura Auth after initialization.
|
|
501
500
|
* All optional fields from AuthConfig are resolved to their default values.
|
|
502
501
|
* @internal
|
|
502
|
+
* @todo: is this needed?
|
|
503
503
|
*/
|
|
504
504
|
interface AuthRuntimeConfig {
|
|
505
505
|
oauth: Record<LiteralUnion<BuiltInOAuthProvider>, OAuthProviderCredentials>;
|
|
@@ -507,6 +507,20 @@ interface AuthRuntimeConfig {
|
|
|
507
507
|
secret: string;
|
|
508
508
|
jose: JoseInstance;
|
|
509
509
|
}
|
|
510
|
+
interface RouterGlobalContext {
|
|
511
|
+
oauth: Record<LiteralUnion<BuiltInOAuthProvider>, OAuthProviderCredentials>;
|
|
512
|
+
cookies: CookieConfigInternal;
|
|
513
|
+
jose: JoseInstance;
|
|
514
|
+
basePath: string;
|
|
515
|
+
trustedProxyHeaders: boolean;
|
|
516
|
+
}
|
|
517
|
+
interface AuthInstance {
|
|
518
|
+
handlers: {
|
|
519
|
+
GET: (request: Request) => Response | Promise<Response>;
|
|
520
|
+
POST: (request: Request) => Response | Promise<Response>;
|
|
521
|
+
};
|
|
522
|
+
jose: JoseInstance;
|
|
523
|
+
}
|
|
510
524
|
/**
|
|
511
525
|
* Base OAuth error response structure.
|
|
512
526
|
*/
|
|
@@ -530,30 +544,5 @@ type AccessTokenError = OAuthError<z.infer<typeof OAuthAccessTokenErrorResponse>
|
|
|
530
544
|
*/
|
|
531
545
|
type TokenRevocationError = OAuthError<"invalid_session_token" | "invalid_csrf_token" | "invalid_redirect_to">;
|
|
532
546
|
type ErrorType = AuthorizationError["error"] | AccessTokenError["error"] | TokenRevocationError["error"];
|
|
533
|
-
interface RouterGlobalContext {
|
|
534
|
-
oauth: Record<LiteralUnion<BuiltInOAuthProvider>, OAuthProviderCredentials>;
|
|
535
|
-
jose: JoseInstance;
|
|
536
|
-
basePath: string;
|
|
537
|
-
cookies: CookieConfig;
|
|
538
|
-
trustedProxyHeaders: boolean;
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Return type of the createAuth function.
|
|
542
|
-
* Contains HTTP handlers for authentication routes and JOSE utilities.
|
|
543
|
-
*/
|
|
544
|
-
interface AuthInstance {
|
|
545
|
-
/**
|
|
546
|
-
* HTTP handlers for authentication routes.
|
|
547
|
-
* Contains GET and POST methods that can be mounted in any framework.
|
|
548
|
-
*/
|
|
549
|
-
handlers: {
|
|
550
|
-
GET: (req: Request) => Response | Promise<Response>;
|
|
551
|
-
POST: (req: Request) => Response | Promise<Response>;
|
|
552
|
-
};
|
|
553
|
-
/**
|
|
554
|
-
* JOSE utilities for JWT operations (signing, encryption, verification, decryption).
|
|
555
|
-
*/
|
|
556
|
-
jose: JoseInstance;
|
|
557
|
-
}
|
|
558
547
|
|
|
559
|
-
export { type AuthRuntimeConfig as A, type BitbucketProfile as B, type CookieConfig as C, type DiscordProfile as D, type ErrorType as E, type FigmaProfile as F, type GitLabProfile as G, type HostCookie as H, type JoseInstance as J, type Nameplate as N, type
|
|
548
|
+
export { type AuthRuntimeConfig as A, type BitbucketProfile as B, type CookieConfig as C, type DiscordProfile as D, type ErrorType as E, type FigmaProfile as F, type GitLabProfile as G, type HostCookie as H, type JoseInstance as J, type Nameplate as N, type OAuthProvider as O, type RouterGlobalContext as R, type Session as S, type TokenRevocationError as T, type User as U, type XProfile as X, type CookieConfigInternal as a, type CookieName as b, type AuthConfig as c, type AuthInstance as d, type OAuthProviderConfig as e, type OAuthProviderCredentials as f, type SpotifyProfile as g, gitlab as h, discord as i, figma as j, bitbucket as k, type GitHubProfile as l, github as m, builtInOAuthProviders as n, createBuiltInOAuthProviders as o, type BuiltInOAuthProvider as p, type JWTStandardClaims as q, type SecureCookie as r, spotify as s, type StandardCookie as t, type CookieStrategyOptions as u, type OAuthError as v, type AuthorizationError as w, x, type AccessTokenError as y };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as AuthConfig, d as AuthInstance } from './index-
|
|
2
|
-
export { J as JoseInstance, S as Session, U as User } from './index-
|
|
1
|
+
import { c as AuthConfig, d as AuthInstance } from './index-DpfbvTZ_.js';
|
|
2
|
+
export { C as CookieConfig, E as ErrorType, J as JoseInstance, O as OAuthProvider, e as OAuthProviderConfig, f as OAuthProviderCredentials, S as Session, U as User } from './index-DpfbvTZ_.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import './schemas.js';
|
|
6
6
|
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
7
|
import 'cookie';
|
|
9
8
|
import './@types/utility.js';
|
|
10
9
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { B as BitbucketProfile,
|
|
1
|
+
export { B as BitbucketProfile, k as bitbucket } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import '../@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import '../schemas.js';
|
|
6
6
|
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
7
|
import 'cookie';
|
package/dist/oauth/discord.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { D as DiscordProfile, N as Nameplate,
|
|
1
|
+
export { D as DiscordProfile, N as Nameplate, i as discord } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/oauth/figma.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { F as FigmaProfile,
|
|
1
|
+
export { F as FigmaProfile, j as figma } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/oauth/github.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { l as GitHubProfile, m as github } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/oauth/gitlab.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { G as GitLabProfile,
|
|
1
|
+
export { G as GitLabProfile, h as gitlab } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/oauth/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { B as BitbucketProfile,
|
|
1
|
+
export { B as BitbucketProfile, p as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, l as GitHubProfile, G as GitLabProfile, N as Nameplate, g as SpotifyProfile, X as XProfile, k as bitbucket, n as builtInOAuthProviders, o as createBuiltInOAuthProviders, i as discord, j as figma, m as github, h as gitlab, s as spotify, x } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import '../@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '@aura-stack/jose/jose';
|
|
5
5
|
import '../schemas.js';
|
|
6
6
|
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
7
|
import 'cookie';
|
package/dist/oauth/spotify.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as SpotifyProfile, s as spotify } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/oauth/x.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { X as XProfile, x } from '../index-
|
|
1
|
+
export { X as XProfile, x } from '../index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import '../schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import '../@types/utility.js';
|
package/dist/secure.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { A as AuthRuntimeConfig } from './index-
|
|
1
|
+
import { A as AuthRuntimeConfig } from './index-DpfbvTZ_.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '@aura-stack/jose/jose';
|
|
4
4
|
import './schemas.js';
|
|
5
5
|
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
6
|
import 'cookie';
|
|
8
7
|
import './@types/utility.js';
|
|
9
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aura-stack/auth",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core auth for @aura-stack/auth",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"format:check": "prettier --check . --cache --cache-location .cache/.prettiercache",
|
|
65
65
|
"type-check": "tsc --noEmit",
|
|
66
66
|
"clean": "rm -rf dist",
|
|
67
|
-
"clean:cts": "
|
|
67
|
+
"clean:cts": "find dist -type f -name \"*.cts\" -delete",
|
|
68
68
|
"prepublish": "pnpm clean:cts"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/dist/@types/index.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import 'zod/v4';
|
|
2
|
-
import '@aura-stack/jose/jose';
|
|
3
|
-
import '../schemas.cjs';
|
|
4
|
-
import '@aura-stack/router';
|
|
5
|
-
import 'cookie';
|
|
6
|
-
export { LiteralUnion, Prettify } from './utility.cjs';
|
|
7
|
-
export { y as AccessTokenError, c as AuthConfig, d as AuthInstance, A as AuthRuntimeConfig, w as AuthorizationError, C as CookieConfig, a as CookieConfigInternal, b as CookieName, u as CookieStrategyOptions, E as ErrorType, H as HostCookie, o as JWTStandardClaims, J as JoseInstance, v as OAuthError, q as OAuthProvider, p as OAuthProviderConfig, O as OAuthProviderCredentials, R as RouterGlobalContext, r as SecureCookie, S as Session, t as StandardCookie, T as TokenRevocationError, U as User } from '../index-kIP4Rb8Q.cjs';
|
|
8
|
-
import 'zod/v4/core';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { R as RouterGlobalContext } from '../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
import '@aura-stack/jose/jose';
|
|
4
|
-
import '../schemas.cjs';
|
|
5
|
-
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import './utility.cjs';
|
|
9
|
-
|
|
10
|
-
declare module "@aura-stack/router" {
|
|
11
|
-
interface GlobalContext extends RouterGlobalContext {}
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { O as OAuthProviderCredentials } from '../../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
import '@aura-stack/jose/jose';
|
|
4
|
-
import '../../schemas.cjs';
|
|
5
|
-
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../../@types/utility.cjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Make a request to the OAuth provider to the token endpoint to exchange the authorization code provided
|
|
12
|
-
* by the authorization server.
|
|
13
|
-
*
|
|
14
|
-
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
|
|
15
|
-
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-5
|
|
16
|
-
* @param oauthConfig - OAuth provider configuration
|
|
17
|
-
* @param redirectURI - The redirect URI registered in the Resource Owner's authorization request and sent in the authorization code exchange
|
|
18
|
-
* @param code - The authorization code received from the OAuth server
|
|
19
|
-
* @returns The access token response from the OAuth server
|
|
20
|
-
*/
|
|
21
|
-
declare const createAccessToken: (oauthConfig: OAuthProviderCredentials, redirectURI: string, code: string, codeVerifier: string) => Promise<{
|
|
22
|
-
access_token: string;
|
|
23
|
-
token_type: string;
|
|
24
|
-
expires_in?: number | undefined;
|
|
25
|
-
refresh_token?: string | undefined;
|
|
26
|
-
scope?: string | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
|
|
29
|
-
export { createAccessToken };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as _aura_stack_router from '@aura-stack/router';
|
|
2
|
-
import { A as AuthRuntimeConfig } from '../../index-kIP4Rb8Q.cjs';
|
|
3
|
-
import 'zod/v4';
|
|
4
|
-
import '@aura-stack/jose/jose';
|
|
5
|
-
import '../../schemas.cjs';
|
|
6
|
-
import 'zod/v4/core';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../../@types/utility.cjs';
|
|
9
|
-
|
|
10
|
-
declare const callbackAction: (oauth: AuthRuntimeConfig["oauth"]) => _aura_stack_router.RouteEndpoint<"GET", "/callback/:oauth", {}>;
|
|
11
|
-
|
|
12
|
-
export { callbackAction };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { O as OAuthProviderCredentials, U as User } from '../../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
import '@aura-stack/jose/jose';
|
|
4
|
-
import '../../schemas.cjs';
|
|
5
|
-
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../../@types/utility.cjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Get user information from the OAuth provider's userinfo endpoint using the provided access token.
|
|
12
|
-
* The response by default is mapped to the standardized `User` format unless a custom
|
|
13
|
-
* `profile` function is provided in the `oauthConfig`.
|
|
14
|
-
*
|
|
15
|
-
* @param oauthConfig - OAuth provider configuration
|
|
16
|
-
* @param accessToken - Access Token to access the userinfo endpoint
|
|
17
|
-
* @returns The user information retrieved from the userinfo endpoint
|
|
18
|
-
*/
|
|
19
|
-
declare const getUserInfo: (oauthConfig: OAuthProviderCredentials, accessToken: string) => Promise<User>;
|
|
20
|
-
|
|
21
|
-
export { getUserInfo };
|
package/dist/actions/index.d.cts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { signInAction } from './signIn/signIn.cjs';
|
|
2
|
-
export { callbackAction } from './callback/callback.cjs';
|
|
3
|
-
export { sessionAction } from './session/session.cjs';
|
|
4
|
-
export { signOutAction } from './signOut/signOut.cjs';
|
|
5
|
-
export { csrfTokenAction } from './csrfToken/csrfToken.cjs';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import '../index-kIP4Rb8Q.cjs';
|
|
8
|
-
import 'zod/v4';
|
|
9
|
-
import '@aura-stack/jose/jose';
|
|
10
|
-
import '../schemas.cjs';
|
|
11
|
-
import 'zod/v4/core';
|
|
12
|
-
import 'cookie';
|
|
13
|
-
import '../@types/utility.cjs';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { O as OAuthProviderCredentials } from '../../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
import '@aura-stack/jose/jose';
|
|
4
|
-
import '../../schemas.cjs';
|
|
5
|
-
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../../@types/utility.cjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Constructs the request URI for the Authorization Request to the third-party OAuth service. It includes
|
|
12
|
-
* the necessary query parameters such as `client_id`, `redirect_uri`, `response_type`, `scope`, `state`,
|
|
13
|
-
* `code_challenge`, and `code_challenge_method`.
|
|
14
|
-
*
|
|
15
|
-
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
|
|
16
|
-
* @see https://datatracker.ietf.org/doc/html/rfc7636#section-4
|
|
17
|
-
*
|
|
18
|
-
* @param oauthConfig - The OAuth configuration for the third-party service.
|
|
19
|
-
* @param redirectURI - The redirect URI where the OAuth service will send the user after authorization.
|
|
20
|
-
* @param state - A unique string used to maintain state between the request and callback.
|
|
21
|
-
*/
|
|
22
|
-
declare const createAuthorizationURL: (oauthConfig: OAuthProviderCredentials, redirectURI: string, state: string, codeChallenge: string, codeChallengeMethod: string) => string;
|
|
23
|
-
declare const getOriginURL: (request: Request, trustedProxyHeaders?: boolean) => URL;
|
|
24
|
-
/**
|
|
25
|
-
* Creates the redirect URI for the OAuth callback based on the original request URL and the OAuth provider.
|
|
26
|
-
*
|
|
27
|
-
* @param requestURL - the original request URL
|
|
28
|
-
* @param oauth - OAuth provider name
|
|
29
|
-
* @returns The redirect URI for the OAuth callback.
|
|
30
|
-
*/
|
|
31
|
-
declare const createRedirectURI: (request: Request, oauth: string, basePath: string, trustedProxyHeaders?: boolean) => string;
|
|
32
|
-
/**
|
|
33
|
-
* Verifies if the request's origin matches the expected origin. It accepts the redirectTo search
|
|
34
|
-
* parameter for redirection. It checks the 'Referer' header of the request with the origin where
|
|
35
|
-
* the authentication flow is hosted. If they do not match, it throws an AuthError to avoid
|
|
36
|
-
* potential `Open URL Redirection` attacks.
|
|
37
|
-
*
|
|
38
|
-
* @param request The incoming request object
|
|
39
|
-
* @param redirectTo Optional redirectTo parameter to override the referer
|
|
40
|
-
* @returns The pathname of the referer URL if origins match
|
|
41
|
-
*/
|
|
42
|
-
declare const createRedirectTo: (request: Request, redirectTo?: string, trustedProxyHeaders?: boolean) => string;
|
|
43
|
-
|
|
44
|
-
export { createAuthorizationURL, createRedirectTo, createRedirectURI, getOriginURL };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as _aura_stack_router from '@aura-stack/router';
|
|
2
|
-
import { A as AuthRuntimeConfig } from '../../index-kIP4Rb8Q.cjs';
|
|
3
|
-
import 'zod/v4';
|
|
4
|
-
import '@aura-stack/jose/jose';
|
|
5
|
-
import '../../schemas.cjs';
|
|
6
|
-
import 'zod/v4/core';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../../@types/utility.cjs';
|
|
9
|
-
|
|
10
|
-
declare const signInAction: (oauth: AuthRuntimeConfig["oauth"]) => _aura_stack_router.RouteEndpoint<"GET", "/signIn/:oauth", {}>;
|
|
11
|
-
|
|
12
|
-
export { signInAction };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { B as BitbucketProfile, i as bitbucket } from '../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import '../@types/utility.cjs';
|
|
3
|
-
import 'zod/v4';
|
|
4
|
-
import '@aura-stack/jose/jose';
|
|
5
|
-
import '../schemas.cjs';
|
|
6
|
-
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
|
-
import 'cookie';
|
package/dist/oauth/discord.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { D as DiscordProfile, N as Nameplate, f as discord } from '../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
import '@aura-stack/jose/jose';
|
|
4
|
-
import '../schemas.cjs';
|
|
5
|
-
import 'zod/v4/core';
|
|
6
|
-
import '@aura-stack/router';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
import '../@types/utility.cjs';
|
package/dist/oauth/figma.d.cts
DELETED
package/dist/oauth/github.d.cts
DELETED
package/dist/oauth/gitlab.d.cts
DELETED
package/dist/oauth/index.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { B as BitbucketProfile, n as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, j as GitHubProfile, G as GitLabProfile, N as Nameplate, e as SpotifyProfile, X as XProfile, i as bitbucket, l as builtInOAuthProviders, m as createBuiltInOAuthProviders, f as discord, h as figma, k as github, g as gitlab, s as spotify, x } from '../index-kIP4Rb8Q.cjs';
|
|
2
|
-
import '../@types/utility.cjs';
|
|
3
|
-
import 'zod/v4';
|
|
4
|
-
import '@aura-stack/jose/jose';
|
|
5
|
-
import '../schemas.cjs';
|
|
6
|
-
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
|
-
import 'cookie';
|
package/dist/oauth/spotify.d.cts
DELETED
package/dist/oauth/x.d.cts
DELETED