5
Hello, I’m with an angular application, which will consume a API
. For that to happen, I must send one POST
to another API
, which serves only to generate a token
that I will pass on all other requests. My doubt is this: after I generate this token
, where should I save it? The first thing that comes to mind is to save directly at the bank, but it does not appear to be recommended. What is usually done in this situation?
In this case, it is short-lived (15 min), and the server is an IIS. Could you tell me, how I would store this token in memory in an Angular application?
– Guilherme Nunes
@Guilhermenes if it’s a token per session, create a service to store and share the value between the modules of your Angular application. If per user and your model allows a user to use two or more devices you will need to share the token with your backend.
– OnoSendai