My API is sending 401 errors to my client.
I can login to my live api from my local client
and local api from my local client.
but not live api from live client
// Angular - auth.service.ts
auth0 = new auth0.WebAuth({
clientID: 'myClientId',
domain: 'toucantesting.auth0.com',
responseType: 'token id_token',
audience: '//api.toucantesting.com',
redirectUri: environment.baseUrl, // <-- 'http://app.toucantesting.com/'
scope: 'openid'
});
// .NET Core - Startup.cs
services
.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
}).AddJwtBearer(options =>
{
options.Authority = "https://toucantesting.auth0.com/";
options.Audience = "https://api.toucantesting.com";
});
Everything appears to be correct in my Callback URLs. It seems to be something with audience, but that’s a wild guess and various changes to that has had no effect.
Any thoughts? Has anyone had similar problems?