[PR #679] [MERGED] Oauth2 consumer #15525

Closed
opened 2025-11-02 11:48:36 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/679
Author: @willemvd
Created: 1/15/2017
Status: Merged
Merged: 2/22/2017
Merged by: @bkcsoft

Base: masterHead: oauth2-consumer


📝 Commits (10+)

  • ded3513 initial stuff for oauth2 login, fails on:
  • 1f94c85 login button on the signIn page to start the OAuth2 flow and a callback for each provider
  • 642f36e Merge branch 'upstream-master' into oauth2-consumer
  • f93aad8 fix indentation
  • 280913b prevent macaron.Context in models
  • b597a86 show login button only when the OAuth2 consumer is configured (and activated)
  • 8c2be7a move overrides of goth functions to init
  • f392ce9 Merge remote-tracking branch 'upstream/master' into oauth2-consumer
  • 2ba7833 create macaron group for oauth2 urls
  • 8e1ea96 fix the broken url (dubble oauth2)

📊 Changes

76 files changed (+7275 additions, -137 deletions)

View changed files

📝 cmd/web.go (+13 -4)
📝 models/error.go (+40 -0)
models/external_login_user.go (+74 -0)
📝 models/login_source.go (+147 -13)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v18.go (+25 -0)
📝 models/user.go (+21 -0)
📝 modules/auth/auth.go (+2 -2)
📝 modules/auth/auth_form.go (+4 -1)
modules/auth/oauth2/oauth2.go (+105 -0)
📝 modules/auth/user_form.go (+1 -1)
📝 options/locale/locale_en-US.ini (+15 -0)
📝 public/css/index.css (+21 -0)
public/img/github.png (+0 -0)
📝 public/js/index.js (+6 -2)
📝 routers/admin/auths.go (+28 -1)
📝 routers/init.go (+1 -0)
📝 routers/repo/http.go (+6 -6)
📝 routers/user/auth.go (+350 -8)
📝 routers/user/setting.go (+45 -1)

...and 56 more files

📄 Description

This is a WIP PR for issue #26
The OAuth2 login is configured as a new LoginSource, but with an alternative flow since this also involves callbacks from the OAuth2 provider.
For now the only implemented OAuth2 provider is GitHub
Outstanding points are the TODO's like fixing the login button to be only displayed when a OAuth2 provider is specified.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/679 **Author:** [@willemvd](https://github.com/willemvd) **Created:** 1/15/2017 **Status:** ✅ Merged **Merged:** 2/22/2017 **Merged by:** [@bkcsoft](https://github.com/bkcsoft) **Base:** `master` ← **Head:** `oauth2-consumer` --- ### 📝 Commits (10+) - [`ded3513`](https://github.com/go-gitea/gitea/commit/ded3513ab74cdf7b2d8a6f94fc615b2f256cee91) initial stuff for oauth2 login, fails on: - [`1f94c85`](https://github.com/go-gitea/gitea/commit/1f94c85c57d4c01bfa5fb90c65b757c046b4fec6) login button on the signIn page to start the OAuth2 flow and a callback for each provider - [`642f36e`](https://github.com/go-gitea/gitea/commit/642f36e917e164e24bb2ee66c64db231c0452331) Merge branch 'upstream-master' into oauth2-consumer - [`f93aad8`](https://github.com/go-gitea/gitea/commit/f93aad830be2c57e0f38f33283454ee010ec0047) fix indentation - [`280913b`](https://github.com/go-gitea/gitea/commit/280913b5c0a863f96f875ce368e9b1efe368f115) prevent macaron.Context in models - [`b597a86`](https://github.com/go-gitea/gitea/commit/b597a8671da747fe3ca8bed29a5876859982326a) show login button only when the OAuth2 consumer is configured (and activated) - [`8c2be7a`](https://github.com/go-gitea/gitea/commit/8c2be7a160ed782c3d40d6b976401fc88dd20912) move overrides of goth functions to init - [`f392ce9`](https://github.com/go-gitea/gitea/commit/f392ce9f738e9a8b2e52a682480d46a7e8ba6876) Merge remote-tracking branch 'upstream/master' into oauth2-consumer - [`2ba7833`](https://github.com/go-gitea/gitea/commit/2ba78334d0380a9f6be0945780e3900555b53d55) create macaron group for oauth2 urls - [`8e1ea96`](https://github.com/go-gitea/gitea/commit/8e1ea968a08072992e24df6dee43ce8be3cdd972) fix the broken url (dubble oauth2) ### 📊 Changes **76 files changed** (+7275 additions, -137 deletions) <details> <summary>View changed files</summary> 📝 `cmd/web.go` (+13 -4) 📝 `models/error.go` (+40 -0) ➕ `models/external_login_user.go` (+74 -0) 📝 `models/login_source.go` (+147 -13) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v18.go` (+25 -0) 📝 `models/user.go` (+21 -0) 📝 `modules/auth/auth.go` (+2 -2) 📝 `modules/auth/auth_form.go` (+4 -1) ➕ `modules/auth/oauth2/oauth2.go` (+105 -0) 📝 `modules/auth/user_form.go` (+1 -1) 📝 `options/locale/locale_en-US.ini` (+15 -0) 📝 `public/css/index.css` (+21 -0) ➕ `public/img/github.png` (+0 -0) 📝 `public/js/index.js` (+6 -2) 📝 `routers/admin/auths.go` (+28 -1) 📝 `routers/init.go` (+1 -0) 📝 `routers/repo/http.go` (+6 -6) 📝 `routers/user/auth.go` (+350 -8) 📝 `routers/user/setting.go` (+45 -1) _...and 56 more files_ </details> ### 📄 Description This is a WIP PR for issue #26 The OAuth2 login is configured as a new LoginSource, but with an alternative flow since this also involves callbacks from the OAuth2 provider. For now the only implemented OAuth2 provider is GitHub Outstanding points are the TODO's like fixing the login button to be only displayed when a OAuth2 provider is specified. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:48:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15525