Closed samitha9125 closed 1 year ago
Verdaccio's cli and web authentication processes are inconsistent.
In cli, the token are stored in .npmrc file, which doesn't contain information such as groups. In web, the token are stored in localstorage, which contain information such as groups.
In cli, the adduser
and authenticate
methods called on login, the authenticate
and allow_access
methods called on install.
In web, the authenticate
method called on login, the allow_access
method called on browse.
So in web, instead of directly checking for the existence of the user, it first tries to check the cache.
Added token hash check in verdaccio-auth-gitlab@2.0.0-beta.11
, fixed this issue.
Verdaccio Version:
5.18
verdaccio-auth-gitlab Plugin Version:latest
Environment:Docker
Scenario: User tries to login with username and the personal access token. Once user successfully authenticated, user details will be cached by the plugin as I understood. Now, user logout and tries to login again. But this time, user provides correct username but incorrect personal access token (i.e. Remove several characters of the token and try to sign in)
Expected Outcome: Verdaccio should decline login.
Actual Outcome: User can successfully login even though the personal token is invalid.
Reproducing steps: