DEV Community

Discussion on: Angular adding a token to each API request

Collapse
 
banzyme2 profile image
ENDEESA

Where is the token stored? Localstorage or in memory as part of the currentUser object?

Collapse
 
dailydevtips1 profile image
Chris Bongers

Actually both, so in this example, it's stored in local storage, but the service is mostly based on memory itself to get the user object.
It will however get it initially from localStorage if it exists.