Auth token
#3971
Replies: 1 comment 3 replies
-
could you format code please ? 🙏🏼 (from mobile app is hard to read) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we are using Verdaccio deployed on ec2 instance with config bellow. We host our privare packages there but there is one package for which I want Verdaccio to act as a proxy. Currently every colleague has in his .npmrc config poiting to our registry and for desired registry for which we need to be authorized like:
registry=https://npm.OUR_DOMAIN.com/ @DESIRED:registry=https://npm.DESIRED.com/ //npm.DESIRED.com/:_authToken=00000000-0000-0000-0000-000000000000
`
uplinks:
![Screenshot 2023-08-14 at 18 36 37](https://private-user-images.githubusercontent.com/10142085/260516241-60c57612-23bf-4f19-a6ca-0c1c667d8f0e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTMwOTMsIm5iZiI6MTczODk1Mjc5MywicGF0aCI6Ii8xMDE0MjA4NS8yNjA1MTYyNDEtNjBjNTc2MTItMjNiZi00ZjE5LWE2Y2EtMGMxYzY2N2Q4ZjBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE4MjYzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlMWU4MzBjOWJkNGM5YjI0OGFjNDFmOWY1YjI3M2IyNjE2MDI0YmQzZmYzMDM1Mzg5ZDYyNTZiMGIxNTk0NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.TKFAZG6qJ0ht010KcXF1xPJ4FfaopOvn3qWFYH1w5io)
DESIRED:
url: https://npm.DESIRED.com/
auth:
type: bearer
token: "00000000-0000-0000-0000-000000000000"
npmjs:
url: https://registry.npmjs.org/
packages:
'@DESIRED/':
access: $all
proxy: DESIRED
'@/':
access: $all
publish: $authenticated
proxy: npmjs
'':
access: $all
proxy: npmjs
`
But When I install packages from DESIRED scope I get 401 with a message
3380 verbose stack HttpErrorAuthUnknown: Unable to authenticate, need: Basic realm="https://npm.DESIRED.com/",service="npm.DESIRED.com"
Even though no logs of 401 can be found on verdaccio logs, only in the logs on my local machine when it fails. but we are sure everything goes through our verdaccio instance. What can be the problem ? It seems like the verdaccio is not passing auth token allong (I also tried the configuration with adding auth headers)
When I try to manually
curl -H 'Authorization: Bearer 00000000-0000-0000-0000-000000000000' https://npm.DESIRED.com/
everything works as expected, from local and from verdaccio instance, even from within docker container
Beta Was this translation helpful? Give feedback.
All reactions