@auditauth/core 0.2.0-beta.4 → 0.2.0-beta.5
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/auth/authorizeCode.cjs +4 -1
- package/dist/auth/authorizeCode.js +4 -1
- package/dist/settings.cjs +1 -1
- package/dist/settings.d.cts +3 -3
- package/dist/settings.d.ts +3 -3
- package/dist/settings.js +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,10 @@ const authorizeCode = async ({ code, client_type }) => {
|
|
|
31
31
|
credentials: "include"
|
|
32
32
|
});
|
|
33
33
|
if (!response.ok) {
|
|
34
|
-
|
|
34
|
+
const errorMessage = await response.text().catch(() => "Unauthorized");
|
|
35
|
+
const error = new Error(errorMessage || "Unauthorized");
|
|
36
|
+
Object.assign(error, { status: response.status });
|
|
37
|
+
throw error;
|
|
35
38
|
}
|
|
36
39
|
const data = await response.json();
|
|
37
40
|
return {
|
|
@@ -8,7 +8,10 @@ const authorizeCode = async ({ code, client_type }) => {
|
|
|
8
8
|
credentials: "include"
|
|
9
9
|
});
|
|
10
10
|
if (!response.ok) {
|
|
11
|
-
|
|
11
|
+
const errorMessage = await response.text().catch(() => "Unauthorized");
|
|
12
|
+
const error = new Error(errorMessage || "Unauthorized");
|
|
13
|
+
Object.assign(error, { status: response.status });
|
|
14
|
+
throw error;
|
|
12
15
|
}
|
|
13
16
|
const data = await response.json();
|
|
14
17
|
return {
|
package/dist/settings.cjs
CHANGED
package/dist/settings.d.cts
CHANGED
|
@@ -2,11 +2,11 @@ declare const CORE_SETTINGS: {
|
|
|
2
2
|
readonly jwt_public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs2EYs4Q9OyjNuAEPqb4j\nIzc52JdfVcNvEbG43Xp8B2kI9QxwRyX7rtFSwKowj3W1BlCLaTIMK3TafWOf9QwH\nfemuL9Ni37PFcGptzpyuoCYYA650EuD82PENcO49lsObvty2cuXxQszbPPvAecm4\nJ/XG70td/W1UwbjAJcdmp8ktZGYR0JXM37hYA9Xq/aKwu7d0FTL6WdKTvt3L5VxL\nF6WNyLs65ZSbu+j8UEkwmoJ9h9Y0mLQmFtmkoh/HWOFyFDnBNiJX0vRb++RhJw6w\ncrSbqpbTu7z4vIep5lgSOut39P273SVTQZ3cGQIS+605Ur5wjkkSzzaJV1QLBBR9\nAQIDAQAB\n-----END PUBLIC KEY-----\n";
|
|
3
3
|
readonly jwt_issuer: "https://api.auditauth.com";
|
|
4
4
|
readonly domains: {
|
|
5
|
-
readonly api: "http://localhost:4000/v1";
|
|
6
|
-
readonly client: "http://localhost:3000";
|
|
7
|
-
} | {
|
|
8
5
|
readonly api: "https://api.auditauth.com/v1";
|
|
9
6
|
readonly client: "https://auditauth.com";
|
|
7
|
+
} | {
|
|
8
|
+
readonly api: "http://localhost:4000/v1";
|
|
9
|
+
readonly client: "https://localhost:3000";
|
|
10
10
|
};
|
|
11
11
|
readonly storage_keys: {
|
|
12
12
|
readonly access: "auditauth_access";
|
package/dist/settings.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ declare const CORE_SETTINGS: {
|
|
|
2
2
|
readonly jwt_public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs2EYs4Q9OyjNuAEPqb4j\nIzc52JdfVcNvEbG43Xp8B2kI9QxwRyX7rtFSwKowj3W1BlCLaTIMK3TafWOf9QwH\nfemuL9Ni37PFcGptzpyuoCYYA650EuD82PENcO49lsObvty2cuXxQszbPPvAecm4\nJ/XG70td/W1UwbjAJcdmp8ktZGYR0JXM37hYA9Xq/aKwu7d0FTL6WdKTvt3L5VxL\nF6WNyLs65ZSbu+j8UEkwmoJ9h9Y0mLQmFtmkoh/HWOFyFDnBNiJX0vRb++RhJw6w\ncrSbqpbTu7z4vIep5lgSOut39P273SVTQZ3cGQIS+605Ur5wjkkSzzaJV1QLBBR9\nAQIDAQAB\n-----END PUBLIC KEY-----\n";
|
|
3
3
|
readonly jwt_issuer: "https://api.auditauth.com";
|
|
4
4
|
readonly domains: {
|
|
5
|
-
readonly api: "http://localhost:4000/v1";
|
|
6
|
-
readonly client: "http://localhost:3000";
|
|
7
|
-
} | {
|
|
8
5
|
readonly api: "https://api.auditauth.com/v1";
|
|
9
6
|
readonly client: "https://auditauth.com";
|
|
7
|
+
} | {
|
|
8
|
+
readonly api: "http://localhost:4000/v1";
|
|
9
|
+
readonly client: "https://localhost:3000";
|
|
10
10
|
};
|
|
11
11
|
readonly storage_keys: {
|
|
12
12
|
readonly access: "auditauth_access";
|
package/dist/settings.js
CHANGED