@aura-stack/auth 0.1.0-rc.9 → 0.1.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/@types/index.cjs +15 -15
- package/dist/@types/index.d.ts +7 -31
- package/dist/@types/index.js +1 -1
- package/dist/@types/router.d.cjs +1 -1
- package/dist/@types/router.d.d.ts +7 -7
- package/dist/@types/utility.cjs +15 -15
- package/dist/@types/utility.d.ts +6 -6
- package/dist/@types/utility.js +1 -1
- package/dist/actions/callback/access-token.cjs +143 -143
- package/dist/actions/callback/access-token.d.ts +15 -20
- package/dist/actions/callback/access-token.js +8 -4
- package/dist/actions/callback/callback.cjs +437 -455
- package/dist/actions/callback/callback.d.ts +10 -12
- package/dist/actions/callback/callback.js +16 -12
- package/dist/actions/callback/userinfo.cjs +131 -134
- package/dist/actions/callback/userinfo.d.ts +9 -9
- package/dist/actions/callback/userinfo.js +10 -6
- package/dist/actions/csrfToken/csrfToken.cjs +162 -171
- package/dist/actions/csrfToken/csrfToken.d.ts +3 -3
- package/dist/actions/csrfToken/csrfToken.js +12 -8
- package/dist/actions/index.cjs +746 -773
- package/dist/actions/index.d.ts +13 -13
- package/dist/actions/index.js +34 -18
- package/dist/actions/session/session.cjs +149 -155
- package/dist/actions/session/session.d.ts +3 -3
- package/dist/actions/session/session.js +11 -7
- package/dist/actions/signIn/authorization.cjs +231 -249
- package/dist/actions/signIn/authorization.d.ts +12 -18
- package/dist/actions/signIn/authorization.js +16 -6
- package/dist/actions/signIn/signIn.cjs +396 -423
- package/dist/actions/signIn/signIn.d.ts +10 -10
- package/dist/actions/signIn/signIn.js +14 -10
- package/dist/actions/signOut/signOut.cjs +417 -440
- package/dist/actions/signOut/signOut.d.ts +3 -3
- package/dist/actions/signOut/signOut.js +15 -11
- package/dist/assert.cjs +35 -36
- package/dist/assert.d.ts +4 -4
- package/dist/assert.js +10 -2
- package/dist/chunk-256KIVJL.js +85 -96
- package/dist/chunk-42XB3YCW.js +19 -17
- package/dist/chunk-6SM22VVJ.js +13 -10
- package/dist/chunk-CAKJT3KS.js +84 -69
- package/dist/chunk-E3OXBRYF.js +19 -17
- package/dist/chunk-EBPE35JT.js +28 -26
- package/dist/chunk-FIPU4MLT.js +18 -16
- package/dist/chunk-FJUDBLCP.js +50 -43
- package/dist/chunk-FKRDCWBF.js +19 -17
- package/dist/chunk-GZU3RBTB.js +51 -40
- package/dist/chunk-HGJ4TXY4.js +132 -100
- package/dist/chunk-HMRKN75I.js +63 -63
- package/dist/chunk-IKHPGFCW.js +11 -9
- package/dist/chunk-JAPMIE6S.js +7 -5
- package/dist/chunk-KRNOMBXQ.js +19 -17
- package/dist/chunk-LLR722CL.js +91 -70
- package/dist/chunk-RLT4RFKV.js +39 -30
- package/dist/chunk-SJPDVKUS.js +107 -88
- package/dist/chunk-SMQO5WD7.js +26 -16
- package/dist/chunk-STHEPPUZ.js +8 -6
- package/dist/chunk-UJJ7R56J.js +47 -37
- package/dist/chunk-UTDLUEEG.js +27 -21
- package/dist/chunk-VFTYH33W.js +54 -37
- package/dist/chunk-XXJKNKGQ.js +33 -23
- package/dist/chunk-ZV4BH47P.js +132 -134
- package/dist/cookie.cjs +169 -175
- package/dist/cookie.d.ts +23 -51
- package/dist/cookie.js +34 -34
- package/dist/error.cjs +75 -75
- package/dist/error.d.ts +30 -30
- package/dist/error.js +15 -8
- package/dist/headers.cjs +28 -28
- package/dist/headers.d.ts +2 -2
- package/dist/headers.js +6 -2
- package/dist/index-DpfbvTZ_.d.ts +249 -298
- package/dist/index.cjs +936 -969
- package/dist/index.d.ts +10 -31
- package/dist/index.js +70 -50
- package/dist/jose.cjs +61 -64
- package/dist/jose.d.ts +8 -8
- package/dist/jose.js +9 -5
- package/dist/oauth/bitbucket.cjs +38 -38
- package/dist/oauth/bitbucket.d.ts +7 -7
- package/dist/oauth/bitbucket.js +6 -2
- package/dist/oauth/discord.cjs +48 -48
- package/dist/oauth/discord.d.ts +7 -7
- package/dist/oauth/discord.js +6 -2
- package/dist/oauth/figma.cjs +39 -39
- package/dist/oauth/figma.d.ts +7 -7
- package/dist/oauth/figma.js +6 -2
- package/dist/oauth/github.cjs +31 -31
- package/dist/oauth/github.d.ts +7 -7
- package/dist/oauth/github.js +6 -2
- package/dist/oauth/gitlab.cjs +39 -39
- package/dist/oauth/gitlab.d.ts +7 -7
- package/dist/oauth/gitlab.js +6 -2
- package/dist/oauth/index.cjs +180 -180
- package/dist/oauth/index.d.ts +7 -26
- package/dist/oauth/index.js +36 -9
- package/dist/oauth/spotify.cjs +39 -39
- package/dist/oauth/spotify.d.ts +7 -7
- package/dist/oauth/spotify.js +6 -2
- package/dist/oauth/x.cjs +39 -39
- package/dist/oauth/x.d.ts +7 -7
- package/dist/oauth/x.js +6 -2
- package/dist/response.cjs +27 -27
- package/dist/response.d.ts +2 -2
- package/dist/response.js +6 -2
- package/dist/schemas.cjs +91 -91
- package/dist/schemas.d.ts +93 -126
- package/dist/schemas.js +18 -18
- package/dist/secure.cjs +95 -98
- package/dist/secure.d.ts +17 -17
- package/dist/secure.js +18 -4
- package/dist/utils.cjs +119 -132
- package/dist/utils.d.ts +11 -26
- package/dist/utils.js +21 -21
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { RouterConfig } from
|
|
1
|
+
import { RouterConfig } from '@aura-stack/router';
|
|
2
2
|
|
|
3
|
-
declare const toSnakeCase: (str: string) => string
|
|
4
|
-
declare const toUpperCase: (str: string) => string
|
|
5
|
-
declare const toCastCase: <Obj extends Record<string, any>, Type extends "snake" | "upper">(
|
|
6
|
-
|
|
7
|
-
type?: Type
|
|
8
|
-
) => Type extends "snake"
|
|
9
|
-
? { [K in keyof Obj as `${string & K}`]: Obj[K] }
|
|
10
|
-
: { [K in keyof Obj as Uppercase<string & K>]: Obj[K] }
|
|
11
|
-
declare const equals: (a: string | number | undefined | null, b: string | number | undefined | null) => boolean
|
|
3
|
+
declare const toSnakeCase: (str: string) => string;
|
|
4
|
+
declare const toUpperCase: (str: string) => string;
|
|
5
|
+
declare const toCastCase: <Obj extends Record<string, any>, Type extends "snake" | "upper">(obj: Obj, type?: Type) => Type extends "snake" ? { [K in keyof Obj as `${string & K}`]: Obj[K]; } : { [K in keyof Obj as Uppercase<string & K>]: Obj[K]; };
|
|
6
|
+
declare const equals: (a: string | number | undefined | null, b: string | number | undefined | null) => boolean;
|
|
12
7
|
/**
|
|
13
8
|
* Sanitizes a URL by removing dangerous patterns that could be used for path traversal
|
|
14
9
|
* or other attacks. This function:
|
|
@@ -21,7 +16,7 @@ declare const equals: (a: string | number | undefined | null, b: string | number
|
|
|
21
16
|
* @param url - The URL or path to sanitize
|
|
22
17
|
* @returns The sanitized URL or path
|
|
23
18
|
*/
|
|
24
|
-
declare const sanitizeURL: (url: string) => string
|
|
19
|
+
declare const sanitizeURL: (url: string) => string;
|
|
25
20
|
/**
|
|
26
21
|
* Validates that a path is a safe relative path to prevent open redirect attacks.
|
|
27
22
|
* A safe relative path must:
|
|
@@ -34,8 +29,8 @@ declare const sanitizeURL: (url: string) => string
|
|
|
34
29
|
* @param path - The path to validate
|
|
35
30
|
* @returns true if the path is safe, false otherwise
|
|
36
31
|
*/
|
|
37
|
-
declare const isValidRelativePath: (path: string | undefined | null) => boolean
|
|
38
|
-
declare const onErrorHandler: RouterConfig["onError"]
|
|
32
|
+
declare const isValidRelativePath: (path: string | undefined | null) => boolean;
|
|
33
|
+
declare const onErrorHandler: RouterConfig["onError"];
|
|
39
34
|
/**
|
|
40
35
|
* Extracts and normalizes the origin and pathname from a URL string.
|
|
41
36
|
* Removes query parameters and hash fragments for a clean path.
|
|
@@ -44,17 +39,7 @@ declare const onErrorHandler: RouterConfig["onError"]
|
|
|
44
39
|
* @param path - The URL or path string to process
|
|
45
40
|
* @returns The normalized URL with origin and pathname, or the original path
|
|
46
41
|
*/
|
|
47
|
-
declare const getNormalizedOriginPath: (path: string) => string
|
|
48
|
-
declare const toISOString: (date: Date | string | number) => string
|
|
42
|
+
declare const getNormalizedOriginPath: (path: string) => string;
|
|
43
|
+
declare const toISOString: (date: Date | string | number) => string;
|
|
49
44
|
|
|
50
|
-
export {
|
|
51
|
-
equals,
|
|
52
|
-
getNormalizedOriginPath,
|
|
53
|
-
isValidRelativePath,
|
|
54
|
-
onErrorHandler,
|
|
55
|
-
sanitizeURL,
|
|
56
|
-
toCastCase,
|
|
57
|
-
toISOString,
|
|
58
|
-
toSnakeCase,
|
|
59
|
-
toUpperCase,
|
|
60
|
-
}
|
|
45
|
+
export { equals, getNormalizedOriginPath, isValidRelativePath, onErrorHandler, sanitizeURL, toCastCase, toISOString, toSnakeCase, toUpperCase };
|
package/dist/utils.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "./chunk-256KIVJL.js"
|
|
12
|
-
import "./chunk-FJUDBLCP.js"
|
|
2
|
+
equals,
|
|
3
|
+
getNormalizedOriginPath,
|
|
4
|
+
isValidRelativePath,
|
|
5
|
+
onErrorHandler,
|
|
6
|
+
sanitizeURL,
|
|
7
|
+
toCastCase,
|
|
8
|
+
toISOString,
|
|
9
|
+
toSnakeCase,
|
|
10
|
+
toUpperCase
|
|
11
|
+
} from "./chunk-256KIVJL.js";
|
|
12
|
+
import "./chunk-FJUDBLCP.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
14
|
+
equals,
|
|
15
|
+
getNormalizedOriginPath,
|
|
16
|
+
isValidRelativePath,
|
|
17
|
+
onErrorHandler,
|
|
18
|
+
sanitizeURL,
|
|
19
|
+
toCastCase,
|
|
20
|
+
toISOString,
|
|
21
|
+
toSnakeCase,
|
|
22
|
+
toUpperCase
|
|
23
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aura-stack/auth",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core auth for @aura-stack/auth",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"cookie": "^1.0.2",
|
|
49
49
|
"dotenv": "^17.2.3",
|
|
50
50
|
"zod": "^4.1.12",
|
|
51
|
-
"@aura-stack/jose": "0.1.0
|
|
51
|
+
"@aura-stack/jose": "0.1.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@aura-stack/tsconfig": "0.0.0",
|