Skip to content

Commit 0fc050d

Browse files
committed
fix(whoami): temporarily disable verifying token validity
since oidc does not currently work for whoami for #958
1 parent 73185a3 commit 0fc050d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/verify-auth.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ export default async function (npmrc, pkg, context) {
1616

1717
// await setNpmrcAuth(npmrc, registry, context);
1818

19-
if (normalizeUrl(registry) === normalizeUrl(DEFAULT_NPM_REGISTRY)) {
20-
try {
21-
const whoamiResult = execa("npm", ["whoami", "--userconfig", npmrc, "--registry", registry], {
22-
cwd,
23-
env,
24-
preferLocal: true,
25-
});
26-
whoamiResult.stdout.pipe(stdout, { end: false });
27-
whoamiResult.stderr.pipe(stderr, { end: false });
28-
await whoamiResult;
29-
} catch {
30-
throw new AggregateError([getError("EINVALIDNPMTOKEN", { registry })]);
31-
}
32-
}
19+
// if (normalizeUrl(registry) === normalizeUrl(DEFAULT_NPM_REGISTRY)) {
20+
// try {
21+
// const whoamiResult = execa("npm", ["whoami", "--userconfig", npmrc, "--registry", registry], {
22+
// cwd,
23+
// env,
24+
// preferLocal: true,
25+
// });
26+
// whoamiResult.stdout.pipe(stdout, { end: false });
27+
// whoamiResult.stderr.pipe(stderr, { end: false });
28+
// await whoamiResult;
29+
// } catch {
30+
// throw new AggregateError([getError("EINVALIDNPMTOKEN", { registry })]);
31+
// }
32+
// }
3333
}

0 commit comments

Comments
 (0)