Identityserver4: JWT token validation error: IDX10214: Audience validation failed

Created on 1 Jun 2018  路  2Comments  路  Source: IdentityServer/IdentityServer4

Hi,

I am trying to authenticate to IS4 from Wordpress via OIDC-Plugin but I always get this error:

JWT token validation error: IDX10214: Audience validation failed. Audiences: 'http://localhost/resources'. Did not match: validationParameters.ValidAudience: 'http://localhost:5000/resources' or validationParameters.ValidAudiences: 'null'.

Wordpress is running on http://localhost and IS4 on http://localhost:5000. How can i make the IS4 accept the "http://localhost/resources" audience? Is there anything I have to add to the authorization request in oidc plugin or is the only solution to run the Wordpress instance on the same port as the IS4?

Best regards

Most helpful comment

I had to set the IssuerUri in the Startup.cs of the IdentityServer4 to http://localhost:5000, now it works:

var builder = services.AddIdentityServer(options =>
            {
                options.Events.RaiseErrorEvents = true;
                options.Events.RaiseInformationEvents = true;
                options.Events.RaiseFailureEvents = true;
                options.Events.RaiseSuccessEvents = true;
                options.IssuerUri = "http://localhost:5000";
            })

All 2 comments

I had to set the IssuerUri in the Startup.cs of the IdentityServer4 to http://localhost:5000, now it works:

var builder = services.AddIdentityServer(options =>
            {
                options.Events.RaiseErrorEvents = true;
                options.Events.RaiseInformationEvents = true;
                options.Events.RaiseFailureEvents = true;
                options.Events.RaiseSuccessEvents = true;
                options.IssuerUri = "http://localhost:5000";
            })

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aravind1729 picture Aravind1729  路  3Comments

user1336 picture user1336  路  3Comments

mackie1001 picture mackie1001  路  3Comments

wangkanai picture wangkanai  路  3Comments

klioqc picture klioqc  路  3Comments