fulls1z3 / ngx-universal

Server platform libraries for Angular
MIT License
25 stars 7 forks source link

use cookies instead of localstorage to allows server JWT calculation #13

Closed theomathieubhvr closed 6 years ago

theomathieubhvr commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[x] feature request

Hi,

This feature would work with the help of @ngx-universal/cache.

My issue is that for every http request for a logged in user I'm passing his JWT token in the headers. The thing is that with localstorage, the angular universal server has no way to know what JWT token is attached to the user, so every request is invalidated and remade by the client.

I could surely help if you tell me what you think about this.

fulls1z3 commented 7 years ago

@theomathieubhvr actually I'll need more or less a similar feature for the authentication module that I developed for Angular. Nowadays, it's really busy with things related to ElasticSearch/MongoDB for the server side. However, I suppose in a week or two I'll already have been deployed the authentication project for Angular and we'll have a better chance to figure things out.

And for sure, your contributions are always welcome, and awesome 👍

fulls1z3 commented 7 years ago

by the way, the authentication project has been deployed on https://github.com/fulls1z3/ngx-auth, have a look at it when you have time 👍