Skip to content

Commit a10c4a5

Browse files
authored
Validate IDP URL only for customized ones (#458)
* validate idp url only if it is customized * fix linter issue
1 parent 34bade9 commit a10c4a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/pkg/auth/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ func getIDPEndpoint() (string, error) {
1414
customIDPEndpoint := viper.GetString(config.IdentityProviderCustomEndpointKey)
1515
if customIDPEndpoint != "" {
1616
idpEndpoint = customIDPEndpoint
17-
}
18-
err := utils.ValidateURLDomain(idpEndpoint)
19-
if err != nil {
20-
return "", fmt.Errorf("validate custom identity provider endpoint: %w", err)
17+
err := utils.ValidateURLDomain(idpEndpoint)
18+
if err != nil {
19+
return "", fmt.Errorf("validate custom identity provider endpoint: %w", err)
20+
}
2121
}
2222

2323
return idpEndpoint, nil

0 commit comments

Comments
 (0)