Avoid unnecessary calls for static data in client config
- Dominant language
- Go
- Stars
- 7.5k
- Forks
- 886
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 120
Description
@pmahindrakar said:
> You mean this right
>
> ```
> if len(scopes) == 0 || cfg.UseAudienceFromAdmin {
> publicClientConfig, err := authClient.GetPublicClientConfig(ctx, &service.PublicClientAuthConfigRequest{})
> if err != nil {
> return nil, fmt.Errorf("failed to fetch client metadata. Error: %v", err)
> }
> // Update scopes from publicClientConfig
> if len(scopes) == 0 {
> scopes = publicClientConfig.GetScopes()
> }
> // Update audience from publicClientConfig
> if cfg.UseAudienceFromAdmin {
> audienceValue = publicClientConfig.GetAudience()
> }
> }
> ```
>
> Which also seems static data we can avoid calling into .
Success crtieria : This data would come down to 0 calls [https://unionai.grafana.net/goto/cfb2858dkem80c?orgId=stacks-400599]()
Contributor guide
Assessment
This issue has not been assessed yet.