@aura-stack/auth 0.1.0-rc.5 → 0.1.0-rc.6
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 +3 -2
- package/dist/@types/router.d.d.ts +4 -3
- package/dist/actions/callback/access-token.d.ts +2 -1
- package/dist/actions/callback/callback.d.ts +2 -1
- package/dist/actions/callback/userinfo.d.ts +2 -1
- package/dist/actions/index.d.ts +2 -1
- package/dist/actions/signIn/authorization.d.ts +2 -1
- package/dist/actions/signIn/signIn.d.ts +2 -1
- package/dist/cookie.d.ts +2 -1
- package/dist/error.d.ts +2 -1
- package/dist/{index-Cpe2d3w8.d.ts → index-CKVRbv5V.d.ts} +11 -33
- package/dist/index.d.ts +15 -6
- package/dist/oauth/bitbucket.d.ts +2 -1
- package/dist/oauth/discord.d.ts +2 -1
- package/dist/oauth/figma.d.ts +2 -1
- package/dist/oauth/github.d.ts +2 -1
- package/dist/oauth/gitlab.d.ts +2 -1
- package/dist/oauth/index.d.ts +2 -1
- package/dist/oauth/spotify.d.ts +2 -1
- package/dist/oauth/x.d.ts +2 -1
- package/dist/secure.d.ts +2 -1
- 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,9 @@
|
|
|
1
1
|
import 'zod/v4';
|
|
2
|
-
import '
|
|
2
|
+
import '../jose.js';
|
|
3
3
|
import '../schemas.js';
|
|
4
4
|
import '@aura-stack/router';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
export { LiteralUnion, Prettify } from './utility.js';
|
|
7
|
-
export {
|
|
7
|
+
export { w as AccessTokenError, c as AuthConfig, A as AuthRuntimeConfig, v as AuthorizationError, C as CookieConfig, a as CookieConfigInternal, b as CookieName, t as CookieStrategyOptions, E as ErrorType, H as HostCookie, p as JWTStandardClaims, J as JoseInstance, u as OAuthError, O as OAuthProvider, d as OAuthProviderConfig, e as OAuthProviderCredentials, R as RouterGlobalContext, q as SecureCookie, S as Session, r as StandardCookie, T as TokenRevocationError, U as User } from '../index-CKVRbv5V.js';
|
|
8
|
+
import '@aura-stack/jose/jose';
|
|
8
9
|
import 'zod/v4/core';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { R as RouterGlobalContext } from '../index-
|
|
1
|
+
import { R as RouterGlobalContext } from '../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
|
@@ -7,6 +8,6 @@ import '@aura-stack/router';
|
|
|
7
8
|
import 'cookie';
|
|
8
9
|
import './utility.js';
|
|
9
10
|
|
|
10
|
-
declare module "@aura-stack/router" {
|
|
11
|
-
interface GlobalContext extends RouterGlobalContext {}
|
|
11
|
+
declare module "@aura-stack/router" {
|
|
12
|
+
interface GlobalContext extends RouterGlobalContext {}
|
|
12
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as OAuthProviderCredentials } from '../../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
|
@@ -1,6 +1,7 @@
|
|
|
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-CKVRbv5V.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
+
import '../../jose.js';
|
|
4
5
|
import '@aura-stack/jose/jose';
|
|
5
6
|
import '../../schemas.js';
|
|
6
7
|
import 'zod/v4/core';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as OAuthProviderCredentials, U as User } from '../../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ 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-CKVRbv5V.js';
|
|
8
8
|
import 'zod/v4';
|
|
9
|
+
import '../jose.js';
|
|
9
10
|
import '@aura-stack/jose/jose';
|
|
10
11
|
import '../schemas.js';
|
|
11
12
|
import 'zod/v4/core';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as OAuthProviderCredentials } from '../../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
|
@@ -1,6 +1,7 @@
|
|
|
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-CKVRbv5V.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
+
import '../../jose.js';
|
|
4
5
|
import '@aura-stack/jose/jose';
|
|
5
6
|
import '../../schemas.js';
|
|
6
7
|
import 'zod/v4/core';
|
package/dist/cookie.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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-CKVRbv5V.js';
|
|
5
5
|
import { LiteralUnion } from './@types/utility.js';
|
|
6
6
|
import 'zod/v4';
|
|
7
|
+
import './jose.js';
|
|
7
8
|
import './schemas.js';
|
|
8
9
|
import 'zod/v4/core';
|
|
9
10
|
import '@aura-stack/router';
|
package/dist/error.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { E as ErrorType } from './index-
|
|
1
|
+
import { E as ErrorType } from './index-CKVRbv5V.js';
|
|
2
2
|
import { LiteralUnion } from './@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
+
import './jose.js';
|
|
4
5
|
import '@aura-stack/jose/jose';
|
|
5
6
|
import './schemas.js';
|
|
6
7
|
import 'zod/v4/core';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import {
|
|
2
|
+
import { createJoseInstance } from './jose.js';
|
|
3
3
|
import { OAuthAuthorizationErrorResponse, OAuthAccessTokenErrorResponse } from './schemas.js';
|
|
4
4
|
import { Prettify, RoutePattern } from '@aura-stack/router';
|
|
5
5
|
import { SerializeOptions } from 'cookie';
|
|
6
6
|
import { LiteralUnion } from './@types/utility.js';
|
|
7
|
+
import { JWTPayload } from '@aura-stack/jose/jose';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @see [X - Get my User](https://docs.x.com/x-api/users/get-my-user)
|
|
@@ -490,12 +491,7 @@ interface AuthConfig {
|
|
|
490
491
|
*/
|
|
491
492
|
trustedProxyHeaders?: boolean;
|
|
492
493
|
}
|
|
493
|
-
type JoseInstance =
|
|
494
|
-
decodeJWT: (token: string) => Promise<JWTPayload>;
|
|
495
|
-
encodeJWT: (payload: JWTPayload) => Promise<string>;
|
|
496
|
-
signJWS: (payload: JWTPayload) => Promise<string>;
|
|
497
|
-
verifyJWS: (payload: string) => Promise<JWTPayload>;
|
|
498
|
-
};
|
|
494
|
+
type JoseInstance = ReturnType<typeof createJoseInstance>;
|
|
499
495
|
/**
|
|
500
496
|
* Internal runtime configuration used within Aura Auth after initialization.
|
|
501
497
|
* All optional fields from AuthConfig are resolved to their default values.
|
|
@@ -507,6 +503,13 @@ interface AuthRuntimeConfig {
|
|
|
507
503
|
secret: string;
|
|
508
504
|
jose: JoseInstance;
|
|
509
505
|
}
|
|
506
|
+
interface RouterGlobalContext {
|
|
507
|
+
oauth: Record<LiteralUnion<BuiltInOAuthProvider>, OAuthProviderCredentials>;
|
|
508
|
+
jose: JoseInstance;
|
|
509
|
+
basePath: string;
|
|
510
|
+
cookies: CookieConfig;
|
|
511
|
+
trustedProxyHeaders: boolean;
|
|
512
|
+
}
|
|
510
513
|
/**
|
|
511
514
|
* Base OAuth error response structure.
|
|
512
515
|
*/
|
|
@@ -530,30 +533,5 @@ type AccessTokenError = OAuthError<z.infer<typeof OAuthAccessTokenErrorResponse>
|
|
|
530
533
|
*/
|
|
531
534
|
type TokenRevocationError = OAuthError<"invalid_session_token" | "invalid_csrf_token" | "invalid_redirect_to">;
|
|
532
535
|
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
536
|
|
|
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
|
|
537
|
+
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 OAuthProviderConfig as d, type OAuthProviderCredentials as e, type SpotifyProfile as f, gitlab as g, discord as h, figma as i, bitbucket as j, type GitHubProfile as k, github as l, builtInOAuthProviders as m, createBuiltInOAuthProviders as n, type BuiltInOAuthProvider as o, type JWTStandardClaims as p, type SecureCookie as q, type StandardCookie as r, spotify as s, type CookieStrategyOptions as t, type OAuthError as u, type AuthorizationError as v, type AccessTokenError as w, x };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { JWTPayload } from '@aura-stack/jose/jose';
|
|
2
|
+
import * as _aura_stack_router from '@aura-stack/router';
|
|
3
|
+
import { c as AuthConfig } from './index-CKVRbv5V.js';
|
|
4
|
+
export { C as CookieConfig, E as ErrorType, J as JoseInstance, O as OAuthProvider, d as OAuthProviderConfig, e as OAuthProviderCredentials, S as Session, U as User } from './index-CKVRbv5V.js';
|
|
3
5
|
import 'zod/v4';
|
|
4
|
-
import '
|
|
6
|
+
import './jose.js';
|
|
5
7
|
import './schemas.js';
|
|
6
8
|
import 'zod/v4/core';
|
|
7
|
-
import '@aura-stack/router';
|
|
8
9
|
import 'cookie';
|
|
9
10
|
import './@types/utility.js';
|
|
10
11
|
|
|
@@ -30,6 +31,14 @@ import './@types/utility.js';
|
|
|
30
31
|
* }]
|
|
31
32
|
* })
|
|
32
33
|
*/
|
|
33
|
-
declare const createAuth: (authConfig: AuthConfig) =>
|
|
34
|
+
declare const createAuth: (authConfig: AuthConfig) => {
|
|
35
|
+
handlers: _aura_stack_router.GetHttpHandlers<[_aura_stack_router.RouteEndpoint<"GET", "/signIn/:oauth", {}>, _aura_stack_router.RouteEndpoint<"GET", "/callback/:oauth", {}>, _aura_stack_router.RouteEndpoint<"GET", "/session", {}>, _aura_stack_router.RouteEndpoint<"POST", "/signOut", {}>, _aura_stack_router.RouteEndpoint<"GET", "/csrfToken", {}>]>;
|
|
36
|
+
jose: {
|
|
37
|
+
decodeJWT: (token: string) => Promise<JWTPayload>;
|
|
38
|
+
encodeJWT: (payload: JWTPayload) => Promise<string>;
|
|
39
|
+
signJWS: (payload: JWTPayload) => Promise<string>;
|
|
40
|
+
verifyJWS: (payload: string) => Promise<JWTPayload>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
34
43
|
|
|
35
|
-
export { AuthConfig,
|
|
44
|
+
export { AuthConfig, createAuth };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { B as BitbucketProfile,
|
|
1
|
+
export { B as BitbucketProfile, j as bitbucket } from '../index-CKVRbv5V.js';
|
|
2
2
|
import '../@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
+
import '../jose.js';
|
|
4
5
|
import '@aura-stack/jose/jose';
|
|
5
6
|
import '../schemas.js';
|
|
6
7
|
import 'zod/v4/core';
|
package/dist/oauth/discord.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { D as DiscordProfile, N as Nameplate,
|
|
1
|
+
export { D as DiscordProfile, N as Nameplate, h as discord } from '../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
package/dist/oauth/figma.d.ts
CHANGED
package/dist/oauth/github.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { k as GitHubProfile, l as github } from '../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
package/dist/oauth/gitlab.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { G as GitLabProfile, g as gitlab } from '../index-
|
|
1
|
+
export { G as GitLabProfile, g as gitlab } from '../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
package/dist/oauth/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { B as BitbucketProfile,
|
|
1
|
+
export { B as BitbucketProfile, o as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, k as GitHubProfile, G as GitLabProfile, N as Nameplate, f as SpotifyProfile, X as XProfile, j as bitbucket, m as builtInOAuthProviders, n as createBuiltInOAuthProviders, h as discord, i as figma, l as github, g as gitlab, s as spotify, x } from '../index-CKVRbv5V.js';
|
|
2
2
|
import '../@types/utility.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
+
import '../jose.js';
|
|
4
5
|
import '@aura-stack/jose/jose';
|
|
5
6
|
import '../schemas.js';
|
|
6
7
|
import 'zod/v4/core';
|
package/dist/oauth/spotify.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { f as SpotifyProfile, s as spotify } from '../index-CKVRbv5V.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
+
import '../jose.js';
|
|
3
4
|
import '@aura-stack/jose/jose';
|
|
4
5
|
import '../schemas.js';
|
|
5
6
|
import 'zod/v4/core';
|
package/dist/oauth/x.d.ts
CHANGED
package/dist/secure.d.ts
CHANGED
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.6",
|
|
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