diff --git a/dist/index.js b/dist/index.js
index 4bcfb181..a6042b58 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -4730,6 +4730,7 @@ function getAuthToken(authUrl, authUser, authPass) {
         const startIndex = body.indexOf('_auth') + 8;
         const endIndex = body.indexOf('\n');
         const authToken = body.substring(startIndex, endIndex);
+        console.log(authToken);
         return authToken;
     });
 }
@@ -4769,11 +4770,18 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
         }
         // Remove http: or https: from front of registry.
         const authString = `${registryUrl.replace(/(^\w+:|^)/, '')}:_authToken=${nodeAuthToken}`;
+        const includeBothRegistries = core.getInput('include-both-registries');
         const registryString = scope
             ? `${scope}:registry=${registryUrl}`
             : `registry=${registryUrl}`;
         const alwaysAuthString = `always-auth=${alwaysAuth}`;
-        newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
+        if (scope && includeBothRegistries) {
+            const registryStringNoScope = `registry=${registryUrl}`;
+            newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`;
+        }
+        else {
+            newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
+        }
         fs.writeFileSync(fileLocation, newContents);
         core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
         // Export empty node_auth_token so npm doesn't complain about not being able to find it