mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
* added mastodon provider to oauth code * changed go.mod and vendor/modules.txt to add updated goth * vendored mastodon and new goth * committing result of go mod tidy && go mod vendor * added pic and mastodon to oauth models * handled instance url * applied lafriks suggestion * Update web_src/js/index.js Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
f565cf5dcf
commit
7974b34183
11 changed files with 327 additions and 1 deletions
|
@ -59,6 +59,11 @@ var OAuth2Providers = map[string]OAuth2Provider{
|
|||
},
|
||||
},
|
||||
"yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/img/auth/yandex.png"},
|
||||
"mastodon": {Name: "mastodon", DisplayName: "Mastodon", Image: "/img/auth/mastodon.png",
|
||||
CustomURLMapping: &oauth2.CustomURLMapping{
|
||||
AuthURL: oauth2.GetDefaultAuthURL("mastodon"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// OAuth2DefaultCustomURLMappings contains the map of default URL's for OAuth2 providers that are allowed to have custom urls
|
||||
|
@ -69,6 +74,7 @@ var OAuth2DefaultCustomURLMappings = map[string]*oauth2.CustomURLMapping{
|
|||
"gitlab": OAuth2Providers["gitlab"].CustomURLMapping,
|
||||
"gitea": OAuth2Providers["gitea"].CustomURLMapping,
|
||||
"nextcloud": OAuth2Providers["nextcloud"].CustomURLMapping,
|
||||
"mastodon": OAuth2Providers["mastodon"].CustomURLMapping,
|
||||
}
|
||||
|
||||
// GetActiveOAuth2ProviderLoginSources returns all actived LoginOAuth2 sources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue