diff options
Diffstat (limited to 'models/oauth2.go')
-rw-r--r-- | models/oauth2.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/oauth2.go b/models/oauth2.go index ccf24eb35d..65d62fdb61 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -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 |