Tyk OAuth2 - Client Credential grant

I am implementing the OIDC Flow (client credential grant) using Tyk and Okta as IDP basically following this tutorial - (//tyk.io/docs/basic-config-and-security/security/authentication-authorization/openid-connect/).
Flow: The user receives a client_id and a client_secret and trade them for an access token using an API client and Tyk validates the access token and check scopes.
I am using the alternative in the solution “JWT scope to policy mapping support” presented in the same tutorial to set scopes permissions. But I notice that it was not mapping correctly the scopes to the policies I have created only because the scopes sent by Okta is a list of scopes (i.e. [“scope1”, “scope2”]) instead of a string of scopes separated by spaces (i.e. “scope1 scope2”).
I reached this conclusion by analysing the “getScopeFromClaim” function in tyk/mw_jwt.go at master · TykTechnologies/tyk · GitHub and when I ran my test it the function returned “nil” instead of the list of scopes.
That said I modified the function to work in this special case too and now it works the way I was expecting:

func getScopeFromClaim(claims jwt.MapClaims, scopeClaimName string) []string {
// get claim with scopes and turn it into slice of strings
if scope, found := claims[scopeClaimName].(string); found {
return strings.Split(scope, " ") // by standard is space separated list of values
} else if scope, found := claims[scopeClaimName].([]interface{}); found {
s := make([]string, len(scope))
for i, v := range scope {
s[i] = fmt.Sprint(v) // make sure every value is a string
}
return s
}
// claim with scopes is optional so return nothing if it is not present
return nil
}

I would like to know if a similar solution could be implemented to the Github project so I could use it or if there is already any other solution to my problem.