So a quick rundown of my app, I have an angular front end with a .net core 2.2 api. This is a bit of a migration of an existing application that is currently a mvc.net app, but the angular app and api project are new.
I’ve gone the route of using the oidc-client library in Angular and I’m able to authenticate just fine and I can properly generate a jwt token and pass that through an interceptor. However, on the api side I am getting errors saying that the audience is invalid. I’ve properly set the audience on the api side, but I was unsure of where to set the proper audience on the angular side? An example of my current settings:
OidcSettings: {
authority: "http://myCompany.auth0.com/",
client_id: "clientId",
redirect_uri: "http://localhost:5000/callback",
post_logout_redirect_uri: "http://localhost:5000/",
response_type: "id_token token",
scope: "openid profile email offline_access",
filterProtocolClaims: true,
loadUserInfo: true,
metadata: {
issuer: "https://myCompany.auth0.com/",
authorization_endpoint: "https://myCompany.auth0.com/authorize",
token_endpoint: "https://myCompany.auth0.com/oauth/token",
userinfo_endpoint: "https://myCompany.auth0.com/userinfo",
mfa_challenge_endpoint: "https://myCompany.auth0.com/mfa/challenge",
jwks_uri: "https://myCompany.auth0.com/.well-known/jwks.json",
registration_endpoint: "https://myCompany.auth0.com/oidc/register",
revocation_endpoint: "https://myCompany.auth0.com/oauth/revoke",
}
}
