forked from forgejo/forgejo
Fix creating OAuth2 auth source from CLI (#14116)
Fix creation OAuth2 auth source from CLI. Fix #8356 Co-authored-by: Daniil Pankratov <daniil.pankratov@t-systems.com>
This commit is contained in:
parent
bdeccc3688
commit
5a94db37ed
3 changed files with 27 additions and 3 deletions
|
@ -119,6 +119,11 @@ func RemoveProvider(providerName string) {
|
|||
delete(goth.GetProviders(), providerName)
|
||||
}
|
||||
|
||||
// ClearProviders clears all OAuth2 providers from the goth lib
|
||||
func ClearProviders() {
|
||||
goth.ClearProviders()
|
||||
}
|
||||
|
||||
// used to create different types of goth providers
|
||||
func createProvider(providerName, providerType, clientID, clientSecret, openIDConnectAutoDiscoveryURL string, customURLMapping *CustomURLMapping) (goth.Provider, error) {
|
||||
callbackURL := setting.AppURL + "user/oauth2/" + url.PathEscape(providerName) + "/callback"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue