How can I define authentication for multiple GitLab NPM Registries?

If I have dozens of npm packages to publish, each of them being a project in GitLab. Do I really need to specify the below line in my npmrc for each projectID?

//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken=<your_token>

I tried specifying

//gitlab.com/api/v4/projects/:_authToken=<your_token>

Without any luck. I would love to push for our team to start using GitLab instead of Artifactory, but it doesn’t appear to be as easily manageable as simply running npm config/login.

AFAIK you should always correlate a registry scope (e.g. @foo) to a project ID.

Using the GitLab CI it is even easier, since the variables required are inherited from the execution environment (e.g. CI_JOB_TOKEN).