gogs / gogs

Gogs is a painless self-hosted Git service
https://gogs.io
MIT License
44.85k stars 4.85k forks source link

Support OAuth 2 authentication #4602

Open nhalstead opened 7 years ago

nhalstead commented 7 years ago

Add in the API for Github Authentication as an Option. Allow the User to Sign-in to the Gogs Website to just have one set of creds for all of their Repositories, for Gogs.io and for GitHub where their Repositories both reside. Github OAuth Service API Doc

unknwon commented 7 years ago

Hi, I think I don't understand this request, can you explain more?

nhalstead commented 7 years ago

Sorry for Not responding, I am asking if you could implement GitHub's OAuth Service into the sign-in page of your site. This would allow any user that uses GitHub, to be able to your service as well and not have to signup via the signup page (or at least not have to enter all of the info since you would be able to grab the person's email and other needed info for the signup with exception to the password). The user would have to enter a new password or the same used to sign in with GitHub.

wjx0912 commented 6 years ago

1 2

example: smartgit can login github with oauth2, here is the screenshot, and gitlab support also, can gogs add this feature? thanks.

luhaixun commented 6 years ago

Hello,

We use gogs as the GitHub Enterprise mirror for some organization, may I know if this feature is merged or discarded?

Thanks, Tim

unknwon commented 6 years ago

@luhaixun currently does not exist in Gogs.

luhaixun commented 6 years ago

@Unknwon does that mean Gogs doesn't support any OAuth 2.0 either?

rickywu commented 5 years ago

Do you have any plan to support OAuth 2?

chotaire commented 5 years ago

+1 for OAuth

unknwon commented 4 years ago

https://github.com/golang/oauth2

mikhailnov commented 1 year ago

It would be nice to have more 3rd-party authentication providers than just Github. Due to political situation I've been thinking about Github alternatives which would not suddenly block completely delete users just because of politics (https://habr.com/ru/news/t/661113/ , https://www.opennet.ru/opennews/art.shtml?num=57077). A self-hosted gogs instance is a good option but allowing users to sign up themselves will require a lot of dealing with spam. Bots can easily by-pass capthas. It would be nice to block direct registration but allow to login via an existing account in a popular system, e.g. Yandex (https://yandex.com/dev/oauth/doc/dg/concepts/about.html), VK (https://dev.vk.com/api/oauth-parameters).

ogarcia commented 1 year ago

@unknwon This feature is crucial to maintain compatibility with Woodpecker. See https://github.com/woodpecker-ci/woodpecker/issues/1894 for more info.

IMHO, I think it would be very good to have that operational integration so that Gogs can have an CI/CD.

tobias-graf-p commented 1 week ago

OAuth support would improve the integration of Gogs with Drone.io, see #7172. Would be great to get OAuth support in Gogs!