fix bug ValidateOauthProvider location

This commit is contained in:
Tao Chen
2024-11-02 04:20:00 +08:00
parent 485ae54e9e
commit c021ebfbdf
2 changed files with 4 additions and 6 deletions

View File

@@ -155,6 +155,10 @@ func (os *OauthService) FetchOidcEndpointByOp(op string) (error, OidcEndpoint) {
// GetOauthConfig retrieves the OAuth2 configuration based on the provider name
func (os *OauthService) GetOauthConfig(op string) (err error, oauthType string, oauthConfig *oauth2.Config) {
err = os.ValidateOauthProvider(op)
if err != nil {
return err, "", nil
}
err, oauthType, oauthConfig = os.getOauthConfigGeneral(op)
if err != nil {
return err, oauthType, nil