From 82e07df53130e074caf047ee76e21ae78e02c4a1 Mon Sep 17 00:00:00 2001 From: "liuye.adam" Date: Wed, 19 May 2021 16:08:09 +0800 Subject: [PATCH] fix: get auth token correct when login with sso --- lib/auth/sso.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/sso.js b/lib/auth/sso.js index 56cff3c06e292..499ad9cb7ecb2 100644 --- a/lib/auth/sso.js +++ b/lib/auth/sso.js @@ -17,7 +17,7 @@ const otplease = require('../utils/otplease.js') const pollForSession = ({ registry, token, opts }) => { log.info('adduser', 'Polling for validated SSO session') return npmFetch.json( - '/-/whoami', { ...opts, registry, forceAuth: { token } } + '/-/whoami', { ...opts, registry, forceAuth: { _authToken: token } } ).then( ({ username }) => username, err => {