Skip to content

Commit 83ef001

Browse files
authored
Small change to registry fetch options
I don't believe we need to destructure the objects as we we're doing.
1 parent 2ffc2ea commit 83ef001

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/utils/oidc.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,9 @@ async function oidc ({ packageName, registry, opts, config }) {
133133
let response
134134
try {
135135
response = await npmFetch.json(new URL(`/-/npm/v1/oidc/token/exchange/package/${escapedPackageName}`, registry), {
136-
...{
137-
...opts,
138-
[authTokenKey]: idToken, // Use the idToken as the auth token for the request
139-
},
136+
...opts,
137+
[authTokenKey]: idToken, // Use the idToken as the auth token for the request
140138
method: 'POST',
141-
headers: {
142-
...opts.headers,
143-
'Content-Type': 'application/json',
144-
// this will not work because the existing auth token will replace it.
145-
// authorization: `Bearer ${idToken}`,
146-
},
147139
})
148140
} catch (error) {
149141
if (error?.body?.message) {

0 commit comments

Comments
 (0)