You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules
Martin Michaelis 55eb1745bd
OAuth2 auto-register (#5123)
* Refactored handleOAuth2SignIn in routers/user/auth.go

The function handleOAuth2SignIn was called twice but some code path could only
be reached by one of the invocations. Moved the unnecessary code path out of
handleOAuth2SignIn.


* Refactored user creation

There was common code to create a user and display the correct error message.
And after the creation the only user should be an admin and if enabled a
confirmation email should be sent. This common code is now abstracted into
two functions and a helper function to call both.

* Added auto-register for OAuth2 users

If enabled new OAuth2 users will be registered with their OAuth2 details.
The UserID, Name and Email fields from the gothUser are used.
Therefore the OpenID Connect provider needs additional scopes to return
the coresponding claims.

* Added error for missing fields in OAuth2 response

* Linking and auto linking on oauth2 registration

* Set default username source to nickname

* Add automatic oauth2 scopes for github and google

* Add hint to change the openid connect scopes if fields are missing

* Extend info about auto linking security risk

Co-authored-by: Viktor Kuzmin <kvaster@gmail.com>
Signed-off-by: Martin Michaelis <code@mgjm.de>
3 years ago
..
analyze Speed up `enry.IsVendor` (#15213) 3 years ago
auth OAuth2 auto-register (#5123) 3 years ago
avatar Avatars and Repo avatars support storing in minio (#12516) 4 years ago
base Add some Unit-Tests (#14500) 3 years ago
cache [Vendor] Update go-redis to v8.5.0 (#13749) 3 years ago
charset Ensure that the detected charset order is set in chardet test (#12574) 4 years ago
context Turn RepoRef and RepoAssignment back into func(*Context) (#15372) 3 years ago
convert [API] pull notification subject status: add "merged" (#15344) 3 years ago
cron Cron job to cleanup hook_task table (#13080) 3 years ago
csv Add Tabular Diff for CSV files (#14661) 3 years ago
doctor Delete Labels & IssueLabels on Repo Delete too (#15039) 3 years ago
emoji Fix several render issues (#14986) 3 years ago
eventsource Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
generate Add gitea-vet (#10948) 4 years ago
git use repo1_bare to test against (#15402) 3 years ago
gitgraph [Refactor] CombinedStatus and CommitStatus related functions & structs (#14026) 4 years ago
graceful Fix regression from #14623 - use debug SVC handler only on interactive sessions (#15210) 3 years ago
hcaptcha hCaptcha Support (#12594) 4 years ago
highlight Use existing analyzer module for language detection for highlighting (#13522) 4 years ago
httpcache Add ETag header (#15370) 3 years ago
httplib Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
indexer Speed up `enry.IsVendor` (#15213) 3 years ago
lfs Add LFS Migration and Mirror (#14726) 3 years ago
log Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
markup Add NeedPostProcess for Parser interface to improve performance of csv render (#15153) 3 years ago
matchlist Add Allow-/Block-List for Migrate & Mirrors (#13610) 4 years ago
metrics Prometheus endpoint (#5256) 6 years ago
migrations Add LFS Migration and Mirror (#14726) 3 years ago
nosql [Vendor] Update go-redis to v8.5.0 (#13749) 3 years ago
notification [refactor] mailer service (#15072) 3 years ago
options Add StatDir and replace com.StatDir (#14099) 4 years ago
password Check passwords against HaveIBeenPwned (#12716) 4 years ago
pprof Add golangci (#6418) 5 years ago
private Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
process Code Formats, Nits & Unused Func/Var deletions (#15286) 3 years ago
public Add ETag header (#15370) 3 years ago
queue Always set the merge base used to merge the commit (#15352) 3 years ago
recaptcha Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
references Code Formats, Nits & Unused Func/Var deletions (#15286) 3 years ago
repofiles Code Formats, Nits & Unused Func/Var deletions (#15286) 3 years ago
repository Add LFS Migration and Mirror (#14726) 3 years ago
secret Attachments: Add extension support, allow all types for releases (#12465) 4 years ago
session Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
setting OAuth2 auto-register (#5123) 3 years ago
ssh Make internal SSH server host key path configurable (#14918) 3 years ago
storage Code Formats, Nits & Unused Func/Var deletions (#15286) 3 years ago
structs Add LFS Migration and Mirror (#14726) 3 years ago
svg Fix filepath basename on Windows for SVG bindata (#12241) 4 years ago
sync Fix missing unlock in uniquequeue (#9790) 5 years ago
task Migrate to use jsoniter instead of encoding/json (#14841) 3 years ago
templates Prevent incorrect HTML escaping in swagger.json (#14957) 3 years ago
test Move middlewares to web/middleware (#14480) 3 years ago
timeutil Fix display since time round (#14226) 3 years ago
translation Use i18n.Reset to reload locales (#15073) 3 years ago
upload Update golangci-lint to version 1.31.0 (#13102) 4 years ago
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) 4 years ago
user Add gitea-vet (#10948) 4 years ago
util Add LFS Migration and Mirror (#14726) 3 years ago
validation Move macaron to chi (#14293) 3 years ago
web Fix bug in Wrap (#15302) 3 years ago