@aura-stack/auth 0.1.0 → 0.2.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.d.ts +3 -4
- package/dist/@types/router.d.d.ts +3 -4
- package/dist/@types/utility.d.ts +1 -5
- package/dist/actions/callback/access-token.cjs +51 -41
- package/dist/actions/callback/access-token.d.ts +3 -4
- package/dist/actions/callback/access-token.js +4 -3
- package/dist/actions/callback/callback.cjs +115 -210
- package/dist/actions/callback/callback.d.ts +3 -4
- package/dist/actions/callback/callback.js +9 -10
- package/dist/actions/callback/userinfo.cjs +35 -22
- package/dist/actions/callback/userinfo.d.ts +3 -4
- package/dist/actions/callback/userinfo.js +6 -5
- package/dist/actions/csrfToken/csrfToken.cjs +34 -103
- package/dist/actions/csrfToken/csrfToken.js +6 -6
- package/dist/actions/index.cjs +234 -391
- package/dist/actions/index.d.ts +3 -4
- package/dist/actions/index.js +16 -17
- package/dist/actions/session/session.cjs +25 -109
- package/dist/actions/session/session.js +4 -5
- package/dist/actions/signIn/authorization.cjs +64 -55
- package/dist/actions/signIn/authorization.d.ts +3 -4
- package/dist/actions/signIn/authorization.js +5 -5
- package/dist/actions/signIn/signIn.cjs +84 -206
- package/dist/actions/signIn/signIn.d.ts +3 -4
- package/dist/actions/signIn/signIn.js +7 -9
- package/dist/actions/signOut/signOut.cjs +88 -234
- package/dist/actions/signOut/signOut.js +8 -9
- package/dist/assert.cjs +5 -0
- package/dist/assert.d.ts +9 -1
- package/dist/assert.js +3 -1
- package/dist/chunk-2RXNXMCZ.js +55 -0
- package/dist/{chunk-UJJ7R56J.js → chunk-4V4JNXVF.js} +13 -10
- package/dist/chunk-6R2YZ4AC.js +22 -0
- package/dist/{chunk-VFTYH33W.js → chunk-7H3OR6UU.js} +29 -9
- package/dist/{chunk-256KIVJL.js → chunk-CXLATHS5.js} +53 -9
- package/dist/{chunk-6SM22VVJ.js → chunk-EIL2FPSS.js} +5 -1
- package/dist/chunk-IMICRJ5U.js +197 -0
- package/dist/{chunk-EBPE35JT.js → chunk-IUYZQTJV.js} +0 -1
- package/dist/{chunk-GZU3RBTB.js → chunk-N2APGLXA.js} +19 -10
- package/dist/chunk-NEVKX6K2.js +70 -0
- package/dist/{chunk-XXJKNKGQ.js → chunk-PTJUYB33.js} +9 -13
- package/dist/chunk-QDO2KSRJ.js +35 -0
- package/dist/{chunk-CAKJT3KS.js → chunk-QEZL7EYN.js} +21 -17
- package/dist/chunk-RRLIF4PQ.js +55 -0
- package/dist/chunk-TLE4PXY3.js +39 -0
- package/dist/chunk-UEH3LVON.js +97 -0
- package/dist/{chunk-HMRKN75I.js → chunk-WD7AUHQ5.js} +12 -7
- package/dist/{chunk-RLT4RFKV.js → chunk-ZLR3LI6X.js} +19 -9
- package/dist/cookie.cjs +140 -99
- package/dist/cookie.d.ts +33 -43
- package/dist/cookie.js +10 -17
- package/dist/errors.cjs +85 -0
- package/dist/errors.d.ts +48 -0
- package/dist/errors.js +18 -0
- package/dist/{index-DpfbvTZ_.d.ts → index-EqsoyjrF.d.ts} +139 -57
- package/dist/index.cjs +427 -389
- package/dist/index.d.ts +4 -5
- package/dist/index.js +37 -26
- package/dist/jose.cjs +23 -12
- package/dist/jose.d.ts +4 -1
- package/dist/jose.js +5 -4
- package/dist/oauth/bitbucket.d.ts +3 -4
- package/dist/oauth/discord.cjs +0 -1
- package/dist/oauth/discord.d.ts +3 -4
- package/dist/oauth/discord.js +1 -1
- package/dist/oauth/figma.d.ts +3 -4
- package/dist/oauth/github.d.ts +3 -4
- package/dist/oauth/gitlab.d.ts +3 -4
- package/dist/oauth/index.cjs +132 -6
- package/dist/oauth/index.d.ts +3 -4
- package/dist/oauth/index.js +12 -5
- package/dist/oauth/spotify.d.ts +3 -4
- package/dist/{response.cjs → oauth/strava.cjs} +21 -9
- package/dist/oauth/strava.d.ts +6 -0
- package/dist/oauth/strava.js +6 -0
- package/dist/oauth/x.d.ts +3 -4
- package/dist/schemas.cjs +11 -5
- package/dist/schemas.d.ts +70 -67
- package/dist/schemas.js +3 -1
- package/dist/secure.cjs +27 -19
- package/dist/secure.d.ts +3 -4
- package/dist/secure.js +4 -3
- package/dist/utils.cjs +90 -15
- package/dist/utils.d.ts +11 -2
- package/dist/utils.js +8 -4
- package/package.json +5 -6
- package/dist/chunk-FJUDBLCP.js +0 -59
- package/dist/chunk-HGJ4TXY4.js +0 -137
- package/dist/chunk-JAPMIE6S.js +0 -10
- package/dist/chunk-LLR722CL.js +0 -96
- package/dist/chunk-SJPDVKUS.js +0 -112
- package/dist/chunk-SMQO5WD7.js +0 -30
- package/dist/chunk-UTDLUEEG.js +0 -31
- package/dist/chunk-ZV4BH47P.js +0 -154
- package/dist/error.cjs +0 -88
- package/dist/error.d.ts +0 -62
- package/dist/error.js +0 -16
- package/dist/response.d.ts +0 -10
- package/dist/response.js +0 -6
package/dist/error.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { E as ErrorType } from './index-DpfbvTZ_.js';
|
|
2
|
-
import { LiteralUnion } from './@types/utility.js';
|
|
3
|
-
import 'zod/v4';
|
|
4
|
-
import '@aura-stack/jose/jose';
|
|
5
|
-
import './schemas.js';
|
|
6
|
-
import 'zod/v4/core';
|
|
7
|
-
import 'cookie';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Error class for all Aura Auth errors.
|
|
11
|
-
*/
|
|
12
|
-
declare class AuthError extends Error {
|
|
13
|
-
readonly type: LiteralUnion<ErrorType>;
|
|
14
|
-
constructor(type: LiteralUnion<ErrorType>, message: string);
|
|
15
|
-
}
|
|
16
|
-
declare class InvalidCsrfTokenError extends AuthError {
|
|
17
|
-
constructor(message?: string);
|
|
18
|
-
}
|
|
19
|
-
declare class InvalidRedirectToError extends AuthError {
|
|
20
|
-
constructor(message?: string);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Verifies if the provided error is an instance of AuthError.
|
|
24
|
-
*
|
|
25
|
-
* @param error The error to be checked
|
|
26
|
-
* @returns True if the error is an instance of AuthError, false otherwise
|
|
27
|
-
*/
|
|
28
|
-
declare const isAuthError: (error: unknown) => error is AuthError;
|
|
29
|
-
/**
|
|
30
|
-
* Captures and Error and verifies if it's an AuthError, rethrowing it if so.
|
|
31
|
-
* If it's a different type of error, it wraps it in a new AuthError with the provided message.
|
|
32
|
-
*
|
|
33
|
-
* @param error The error to be processed
|
|
34
|
-
* @param message The error message to be used if wrapping the error
|
|
35
|
-
*/
|
|
36
|
-
declare const throwAuthError: (error: unknown, message?: string) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Errores responses returned by the OAuth flows including Authorization and Access Token errors.
|
|
39
|
-
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
|
|
40
|
-
* @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
|
|
41
|
-
*/
|
|
42
|
-
declare const ERROR_RESPONSE: {
|
|
43
|
-
AUTHORIZATION: {
|
|
44
|
-
INVALID_REQUEST: string;
|
|
45
|
-
UNAUTHORIZED_CLIENT: string;
|
|
46
|
-
ACCESS_DENIED: string;
|
|
47
|
-
UNSUPPORTED_RESPONSE_TYPE: string;
|
|
48
|
-
INVALID_SCOPE: string;
|
|
49
|
-
SERVER_ERROR: string;
|
|
50
|
-
TEMPORARILY_UNAVAILABLE: string;
|
|
51
|
-
};
|
|
52
|
-
ACCESS_TOKEN: {
|
|
53
|
-
INVALID_REQUEST: string;
|
|
54
|
-
INVALID_CLIENT: string;
|
|
55
|
-
INVALID_GRANT: string;
|
|
56
|
-
UNAUTHORIZED_CLIENT: string;
|
|
57
|
-
UNSUPPORTED_GRANT_TYPE: string;
|
|
58
|
-
INVALID_SCOPE: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { AuthError, ERROR_RESPONSE, InvalidCsrfTokenError, InvalidRedirectToError, isAuthError, throwAuthError };
|
package/dist/error.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AuthError,
|
|
3
|
-
ERROR_RESPONSE,
|
|
4
|
-
InvalidCsrfTokenError,
|
|
5
|
-
InvalidRedirectToError,
|
|
6
|
-
isAuthError,
|
|
7
|
-
throwAuthError
|
|
8
|
-
} from "./chunk-FJUDBLCP.js";
|
|
9
|
-
export {
|
|
10
|
-
AuthError,
|
|
11
|
-
ERROR_RESPONSE,
|
|
12
|
-
InvalidCsrfTokenError,
|
|
13
|
-
InvalidRedirectToError,
|
|
14
|
-
isAuthError,
|
|
15
|
-
throwAuthError
|
|
16
|
-
};
|
package/dist/response.d.ts
DELETED