Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing new access token with configured token from npmrc #6847

Closed

Conversation

jpg619
Copy link
Contributor

@jpg619 jpg619 commented Sep 29, 2023

get flatOptions method is used to fetch all the configuration data including tokens.

The const { list } = this.config object used to fetch current access token + configured token written in the .npmrc file.

const tokenList = [] array is used for collecting the tokens from list.
Using iteration methods instead of filter and map to avoid Object Object complexity.

const flatKeyPair is used to identify key pair from const { flat } = this.config.

tokenList[1] will be avail if any active token written inside .npmrc file. if avail then replace with that.

References

Fixes #3888

@jpg619 jpg619 requested a review from a team as a code owner September 29, 2023 21:13
@jpg619 jpg619 closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] NPM Logout Removes Wrong Access Token
2 participants