#LocalStroage and Api call issue in Angular v20
4 messages · Page 1 of 1 (latest)
You cannot use localStorage with SSR. localStorage is a client only API. Node.JS does support it now, but that will store things locally on the server and it won't magically be available on the client.
The only storage that is available across client and server in an SSR environment is cookies.
Hi How are you doing ?
First api call happens on the server, on the other hand second api call happens in the browser where you can access the token.
This is the main issue. Think of using TransferState from angular core.
I dont think show TransferState will work with localstorage,