brandonroberts/ngrx-ngconf-2018

Persiting auth state

Closed this issue · 1 comments

Hi Brandon, just watched you ngconf talk on Auth, I was wondering what do recommend for handling User data on browser reload, as in the demo State is lost and the User is logged.

Would storing the User data in Local Storage be the best practice then rehydrating the data in the Store?

Yes, and there is a package that helps with that https://github.com/btroncone/ngrx-store-localstorage