mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-11-29 08:33:21 +00:00
fix bug ValidateOauthProvider location
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user