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/docs/content/doc/advanced
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
..
adding-legal-pages.en-us.md Add Privacy Policy and Terms of Service Page (#9513) 5 years ago
clone-filter.en-us.md [Docs] Clone filters (#14555) 3 years ago
cmd-embedded.en-us.md Reformat docs (#13897) 4 years ago
config-cheat-sheet.en-us.md OAuth2 auto-register (#5123) 3 years ago
config-cheat-sheet.zh-cn.md Add NeedPostProcess for Parser interface to improve performance of csv render (#15153) 3 years ago
customizing-gitea.en-us.md Note that all template directories are relative to the `CustomPath` configuration, not a `custom` directory inside it (#14399) 4 years ago
customizing-gitea.zh-cn.md Rename custom/conf/app.ini.sample to custom/conf/app.example.ini for better syntax light on editor (#11926) 4 years ago
environment-variables.en-us.md Update docs and comments to remove macaron (#14491) 3 years ago
environment-variables.zh-cn.md Update docs and comments to remove macaron (#14491) 3 years ago
external-renderers.en-us.md Reformat docs (#13897) 4 years ago
hacking-on-gitea.zh-cn.md ZH-CN translation of Advanced part (#5090) 6 years ago
logging-documentation.en-us.md Update docs and comments to remove macaron (#14491) 3 years ago
mail-templates-us.md Fix documentation for the fallback mail subject (#15223) 3 years ago
make.fr-fr.md Reformat docs (#13897) 4 years ago
make.zh-cn.md Reformat docs (#13897) 4 years ago
repo-indexer.en-us.md Reformat docs (#13897) 4 years ago
search-engines-indexation.en-us.md Reformat docs (#13897) 4 years ago
signing.en-us.md Reformat docs (#13897) 4 years ago
third-party-tools.zh-cn.md Reformat docs (#13897) 4 years ago