Closed iranicus closed 6 years ago
Hi
Have you whitelisted localhost:8080
in app.modules.ts
export function jwtOptionsFactory(storage: Storage) {
return {
tokenGetter: () => storage.get('jwt_token'),
whitelistedDomains: ['localhost:8080']
}
}
https://github.com/ralscha/blog/blob/master/jwt/client/src/app/app.module.ts#L16-L21
Hey's so I had a look and my spelling of the property whitelistedDomains was incorrect, instead I had whitelistDomains which I now replaced with the correct property name and it now works. Thanks for indicating this.
So currently having api issues with the /secret and /authenticate routes where I get a Access Denied 403 response on both possibly indicating the JWT might not be passed in the header as I have inspected the requests in Chrome and can't seem to find the JWT anywhere in the headers. For the /secret route issue I simply log in and get the 403 response, as for the /authenticate I simply restart the application after prior logging in and get the 403 response when this is called.
/secret details:
/authenticate details:
It's probably something specific that I'm missing, or perhaps a dependency version issue since it seems like a front end problem.