@xevy/cli 0.1.10 → 0.1.11
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/bin/xevy.mjs +4 -1
- package/package.json +1 -1
package/bin/xevy.mjs
CHANGED
|
@@ -332,7 +332,10 @@ function readEnvironmentToken() {
|
|
|
332
332
|
async function validateApiKey(base, token) {
|
|
333
333
|
let response;
|
|
334
334
|
try {
|
|
335
|
-
|
|
335
|
+
// `/api/auth/*` is intentionally session-only and rejects API keys.
|
|
336
|
+
// `/api/profile` is a lightweight authenticated endpoint that accepts both
|
|
337
|
+
// browser JWTs and API keys, making it suitable for credential validation.
|
|
338
|
+
response = await fetch(`${base}/api/profile`, {
|
|
336
339
|
headers: { Authorization: `Bearer ${token}` },
|
|
337
340
|
signal: AbortSignal.timeout(10_000),
|
|
338
341
|
});
|
package/package.json
CHANGED