Sort OIDC providers for deterministic API response order
EnabledProviders() iterated a map, producing nondeterministic order. Sort the slice before returning to ensure stable UI and test behavior. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"io"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -258,6 +259,7 @@ func (s *Service) EnabledProviders() []coredata.OIDCProvider {
|
||||
for p := range s.providers {
|
||||
providers = append(providers, p)
|
||||
}
|
||||
slices.Sort(providers)
|
||||
return providers
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user