-
Notifications
You must be signed in to change notification settings - Fork 672
Add Oauth2 login to cli #1195
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
Comments
I kind of looked into this a bit for fun, as a next step now that the CLI is a bit easier to use. I think it would be possible to do conveniently only for GitLab.com, if we
But for self-managed users would probably need to create their own OAuth apps and paste in the ID and instance URL, so the convenience over just creating a PAT in the web UI is kind of lost. It would actually be easier then to just steal the browser cookies and create a PAT like that, which seems hacky to me. Or no? 😁 If I'm not mistaken, it seems But maybe I'm just a bit clueless here with OAuth. Open to ideas @max-wittig @JohnVillalovos 😅 Edit: FWIW, |
Thanks for your investigation @nejch. As most people are using gitlab.com, we could think about adding this. Otherwise it's really mostly a one-time thing for most users, maybe a message is really enough for now. |
How did you come up with this? Probably this would be valid in the OpenSource world, but EE very likely uses self-installed variant for different reasons I have the feeling (and also speaking for myself) |
@mstenz yes I'd say that assumption is for open source. For self-hosted EE (or Free) instances, we can't really do this flow without users also providing the instance URL and someone creating an OAuth application on that instance, then providing its client ID. At that point it makes more sense to just create a token IMO. |
maybe you can add something like question(s) where the user can put in these fields very easily and probably also save them in a connection file so it is not required to be entered all the time. |
There is now some motivation on the GitLab side to make this more feasible across self-managed instances as well: https://gitlab.com/gitlab-org/gitlab/-/issues/413809 We could potentially hook into that if it gets implemented. Then the gitlab.com vs self-managed discussion is no longer needed :) |
Description of the problem, including code/CLI snippet
Let's see if we can do something similar to the GitHub CLI
The text was updated successfully, but these errors were encountered: