n4bb12 / verdaccio-github-oauth-ui

📦🔐 GitHub OAuth plugin for Verdaccio
https://verdaccio.org
MIT License
73 stars 45 forks source link

Ability to override pre/postfix for auth, ability to change what gets replaced #137

Closed hybridherbst closed 2 years ago

hybridherbst commented 2 years ago

Feature Request

Currently, the 2nd and 3rd lines in the Registry Info will be replaced by a hardcoded set of strings. It would be nice if this was configurable (e.g. via config.yaml in Verdaccio), for two reasons:

Is your feature request related to a problem? Please describe.

See above

Describe the solution you'd like

  1. Ability to use Verdaccio's config.yaml to specify a string, e.g. "myprefix {{auth}} mypostfix"
  2. Ability to specify if the always-auth command is also replaced
  3. Ability to specify in the config under which conditions this is replaced (e.g. we only want that "Unity Package Manager" tab actually)

Additional context

See very long text here image

n4bb12 commented 2 years ago

I think the idea makes sense.

Verdaccio by default shows tabs for yarn and pnpm. Those commands are currently also not adjusted by the plugin.

Making this configurable sounds a little complicated to me. Especially the conditional stuff.

I wonder why Verdaccio shows 3 copy buttons instead of one. I could imagine replacing this with a single copy button and a single multiline text. Then this text could be configured for each package manager and decisions like whether to replace the always-auth command would be implicit since you would just configure whatever you want to see.

What are your thoughts and do you have a suggestion for how this could look like in yaml?

n4bb12 commented 2 years ago

@hybridherbst any thoughts?

hybridherbst commented 2 years ago

Still playing around in our fork, haven't come to a great solution yet, and some trouble understanding Verdaccio config and how to bubble it through an app it seems 😅 But basically, what I was trying is to a) specify in the Verdaccio theme which tabs are rendered b) specify in this plugin how and where the auth code is pasted, e.g. different regex

I'll update this with more info once I have a result I like - please feel free to turn this issue into a discussion in the meantime :)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.