Created
April 21, 2022 20:55
-
-
Save MylesBorins/02844588637be106462e729f74ed3299 to your computer and use it in GitHub Desktop.
Allow for automation tokens when setting 2FA mode via CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/workspaces/libnpmaccess/lib/index.js b/workspaces/libnpmaccess/lib/index.js | |
index 71219d009..27cebddec 100644 | |
--- a/workspaces/libnpmaccess/lib/index.js | |
+++ b/workspaces/libnpmaccess/lib/index.js | |
@@ -169,7 +169,7 @@ function setRequires2fa (spec, required, opts = {}) { | |
return npmFetch(uri, { | |
...opts, | |
method: 'POST', | |
- body: { publish_requires_tfa: required }, | |
+ body: { publish_requires_tfa: required, automation_token_overrides_tfa: required }, | |
spec, | |
ignoreBody: true, | |
}).then(() => true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment