@absolutejs/auth 0.53.1 → 0.53.3
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/cli/migrate.js +10 -17
- package/dist/cli/migrate.js.map +3 -3
- package/dist/htmx/index.js +14 -30
- package/dist/htmx/index.js.map +3 -3
- package/dist/index.js +14 -30
- package/dist/index.js.map +3 -3
- package/dist/manifest.js +14 -3
- package/dist/manifest.js.map +3 -3
- package/dist/manifest.json +18 -18
- package/dist/providers/clients.d.ts +1 -1
- package/dist/providers/index.js +14 -30
- package/dist/providers/index.js.map +3 -3
- package/package.json +2 -2
package/dist/htmx/index.js
CHANGED
|
@@ -1077,7 +1077,7 @@ var providers = defineProviders({
|
|
|
1077
1077
|
}
|
|
1078
1078
|
},
|
|
1079
1079
|
microsoftentraid: {
|
|
1080
|
-
authorizationUrl: (config) => `https
|
|
1080
|
+
authorizationUrl: (config) => `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/authorize`,
|
|
1081
1081
|
isOIDC: true,
|
|
1082
1082
|
isRefreshable: true,
|
|
1083
1083
|
PKCEMethod: "S256",
|
|
@@ -1085,15 +1085,15 @@ var providers = defineProviders({
|
|
|
1085
1085
|
authIn: "header",
|
|
1086
1086
|
encoding: "application/json",
|
|
1087
1087
|
method: "GET",
|
|
1088
|
-
url:
|
|
1088
|
+
url: "https://graph.microsoft.com/oidc/userinfo"
|
|
1089
1089
|
},
|
|
1090
1090
|
scopeRequired: false,
|
|
1091
|
-
subject: ["
|
|
1091
|
+
subject: ["sub"],
|
|
1092
1092
|
subjectType: "string",
|
|
1093
1093
|
tokenRequest: {
|
|
1094
1094
|
authIn: "body",
|
|
1095
1095
|
encoding: "application/x-www-form-urlencoded",
|
|
1096
|
-
url: (config) => `https
|
|
1096
|
+
url: (config) => `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/token`
|
|
1097
1097
|
}
|
|
1098
1098
|
},
|
|
1099
1099
|
monday: {
|
|
@@ -1214,7 +1214,7 @@ var providers = defineProviders({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
},
|
|
1216
1216
|
onspark: {
|
|
1217
|
-
authorizationUrl: "https://
|
|
1217
|
+
authorizationUrl: "https://onspark.com/oauth2/authorize",
|
|
1218
1218
|
email: ["email"],
|
|
1219
1219
|
familyName: ["family_name"],
|
|
1220
1220
|
fullName: ["name"],
|
|
@@ -1227,13 +1227,13 @@ var providers = defineProviders({
|
|
|
1227
1227
|
authIn: "header",
|
|
1228
1228
|
encoding: "application/json",
|
|
1229
1229
|
method: "GET",
|
|
1230
|
-
url: "https://
|
|
1230
|
+
url: "https://onspark.com/oauth2/userinfo"
|
|
1231
1231
|
},
|
|
1232
1232
|
revocationRequest: {
|
|
1233
1233
|
authIn: "body",
|
|
1234
1234
|
encoding: "application/x-www-form-urlencoded",
|
|
1235
1235
|
tokenParamName: "token",
|
|
1236
|
-
url: "https://
|
|
1236
|
+
url: "https://onspark.com/oauth2/revoke"
|
|
1237
1237
|
},
|
|
1238
1238
|
scopeRequired: true,
|
|
1239
1239
|
subject: ["sub"],
|
|
@@ -1241,7 +1241,7 @@ var providers = defineProviders({
|
|
|
1241
1241
|
tokenRequest: {
|
|
1242
1242
|
authIn: "body",
|
|
1243
1243
|
encoding: "application/x-www-form-urlencoded",
|
|
1244
|
-
url: "https://
|
|
1244
|
+
url: "https://onspark.com/oauth2/token"
|
|
1245
1245
|
}
|
|
1246
1246
|
},
|
|
1247
1247
|
osu: {
|
|
@@ -2109,10 +2109,7 @@ var getWithingsProps = async (config) => {
|
|
|
2109
2109
|
nonceUrl.searchParams.set("timestamp", timestamp.toString());
|
|
2110
2110
|
nonceUrl.searchParams.set("signature", hashedSignature);
|
|
2111
2111
|
const nonceTarget = nonceUrl.toString();
|
|
2112
|
-
const nonceResponse = await fetch(nonceTarget, {
|
|
2113
|
-
...h2IfHttps(nonceTarget),
|
|
2114
|
-
method: "POST"
|
|
2115
|
-
});
|
|
2112
|
+
const nonceResponse = await fetch(nonceTarget, { method: "POST" });
|
|
2116
2113
|
const nonceData = await nonceResponse.json();
|
|
2117
2114
|
if (nonceData.status === 0) {
|
|
2118
2115
|
return {
|
|
@@ -2122,10 +2119,6 @@ var getWithingsProps = async (config) => {
|
|
|
2122
2119
|
}
|
|
2123
2120
|
return;
|
|
2124
2121
|
};
|
|
2125
|
-
var h2IfHttps = (url) => {
|
|
2126
|
-
const init = url.startsWith("https://") ? { protocol: "http2" } : {};
|
|
2127
|
-
return init;
|
|
2128
|
-
};
|
|
2129
2122
|
var hmacSha256 = async (message, secret) => {
|
|
2130
2123
|
const encoder = new TextEncoder;
|
|
2131
2124
|
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { hash: "SHA-256", name: "HMAC" }, false, ["sign"]);
|
|
@@ -2496,10 +2489,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2496
2489
|
init.body = encoding === "application/json" ? JSON.stringify(resolvedBody) : new URLSearchParams(resolvedBody).toString();
|
|
2497
2490
|
}
|
|
2498
2491
|
const profileTarget = endpoint.toString();
|
|
2499
|
-
const response = await fetch(profileTarget,
|
|
2500
|
-
...h2IfHttps(profileTarget),
|
|
2501
|
-
...init
|
|
2502
|
-
});
|
|
2492
|
+
const response = await fetch(profileTarget, init);
|
|
2503
2493
|
if (!response.ok)
|
|
2504
2494
|
throw await createOAuth2FetchError(response);
|
|
2505
2495
|
return response.json();
|
|
@@ -2524,9 +2514,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2524
2514
|
encoding,
|
|
2525
2515
|
url: tokenUrl
|
|
2526
2516
|
});
|
|
2527
|
-
const response = await fetch(request
|
|
2528
|
-
...h2IfHttps(request.url)
|
|
2529
|
-
});
|
|
2517
|
+
const response = await fetch(request);
|
|
2530
2518
|
if (!response.ok)
|
|
2531
2519
|
throw await createOAuth2FetchError(response);
|
|
2532
2520
|
return response.json();
|
|
@@ -2580,9 +2568,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2580
2568
|
url: `${endpoint.toString()}?${tokenParamName}=${token}`
|
|
2581
2569
|
});
|
|
2582
2570
|
}
|
|
2583
|
-
const response = await fetch(request
|
|
2584
|
-
...h2IfHttps(request.url)
|
|
2585
|
-
});
|
|
2571
|
+
const response = await fetch(request);
|
|
2586
2572
|
if (!response.ok)
|
|
2587
2573
|
throw await createOAuth2FetchError(response);
|
|
2588
2574
|
},
|
|
@@ -2614,9 +2600,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2614
2600
|
encoding,
|
|
2615
2601
|
url: tokenUrl
|
|
2616
2602
|
});
|
|
2617
|
-
const response = await fetch(request
|
|
2618
|
-
...h2IfHttps(request.url)
|
|
2619
|
-
});
|
|
2603
|
+
const response = await fetch(request);
|
|
2620
2604
|
if (!response.ok)
|
|
2621
2605
|
throw await createOAuth2FetchError(response);
|
|
2622
2606
|
const tokenResponse = await response.json();
|
|
@@ -2716,5 +2700,5 @@ export {
|
|
|
2716
2700
|
escapeHtml
|
|
2717
2701
|
};
|
|
2718
2702
|
|
|
2719
|
-
//# debugId=
|
|
2703
|
+
//# debugId=5B08A72785E8D12364756E2164756E21
|
|
2720
2704
|
//# sourceMappingURL=index.js.map
|