Tyk and oidc integration

I am trying to set up tyk with OIDC. I followed this guide:
Integrate with OIDC.
When I am sending a request to tyk (providing the bearer token that I get from my auth server), I see the following error message (in the logs): “Validation Error. The Provider __ does not have a client id matching any of the token audiences __”, and the authentication fails.
My token has the “aud” field set to the same value as in my api definition (the client id base64 encoded), and yet it seems like tyk-gateway fails at the validateAudiences method (from idtokenvalidator.go) when it tries to find a match between the token audiences and the client ids in the api file.
I can’t understand what I am doing wrong here.
Any help would be appreciated!

Hello @Ori,

Which OIDC provider are you using? I will try to get this setup and get back to you.

Hey @zaid
I’m using self-hosted OIDC provider (RedHat SSO).

Hello @Ori were you working with tyk pro or tyk community edition?

tyk community edition

1 Like

Hello @Ori I haven’t had a chance to look at this yet. I will have sometime today to try and recreate it however.

@Ori can you please send me the API definition and gateway logs.