How can I define authentication for multiple GitLab NPM Registries?

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).