I have created an API and an SPA in my dashboard and I have tested the API using postman and it all works fine.
In my Angular application I replaced my auth.service, auth.guard with the ones in the SPA getting started example and was able to login, which is good. Then I needed to communicate with my API, so I used this repo:
And took the interceptor there and added the new method getTokenSilently$ which appeared to work. But my API returns a 401 unauthorised response.
If I look in the console, I can see that the bearer token it is sending is significantly shorter than the one I pasted into postman:
Does anyone know why? I assume it is a simple fix, but I am not sure what to do…