N
N
nasnetstep2017-08-21 11:12:04
Angular
nasnetstep, 2017-08-21 11:12:04

Angular 4 cli / Universal - Content rendering not working with API, auth?

Did universal according to this tutorial
https://medium.com/@evertonrobertoauler/angular-4-...
Everything works, except for the moment with the API. The data is not rendered through node.js, it is pulled up only in the browser.
Perhaps this is due to auth, since the API needs a token, which is stored in localStorage or cookies.
I know that localStorage will not work, I tried to set up cookies through the service
https://gist.github.com/kkaabbaa/463eb509ec94800a7...
It did not work
Then I used this library https://github.com/poeticninja/universal-auth
errors with localStorage are gone, but it can be seen from the logs that the token is not stored anywhere, more precisely, it does not record it, and therefore requests go without it
What could it be? who had this problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question