Angular 6 auth using cookies

余生颓废 提交于 2020-01-16 20:33:49

问题


Any idea on how to implement cookie auth in Angular 6? I have tried using AuthGuard but I'm not able to check if the user is authenticated or not because the cookie is HttpOnly so I can't access its content. I need this to protect some routes.

Thanks!!!


回答1:


with JWT you should save the token, you must kepp the key in the cookie.



来源:https://stackoverflow.com/questions/52874219/angular-6-auth-using-cookies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!