Angular4会话处理 [英] Angular4 session handling
问题描述
我有一个用于API的sailsjs后端,我想将Angular4用于我的前端.我想知道如何在Angular上处理会话?我尝试阅读文档,但无法提出任何建议.
I have a sailsjs backend for API's and I want to use Angular4 for my frontend. I was wondering, how can I handle sessions on Angular? I tried reading the documentation and was unable to come up with anything.
特别是我需要能够处理登录,注销,CSRF保护等.因为Sails内置了所有功能,是否可以在Sails中使用Angular4?
Specifically I need to be able to handle the login, log out, CSRF protection, etc. Is it possible to use Angular4 in Sails because Sails has all of that built in?
推荐答案
是的, 您可以通过会话服务存储会话详细信息来管理会话.
yes, you can manage session by storing session details through a session service.
最佳做法是使用Google Firebase身份验证功能,该功能可管理所有会话,登录和注销.
for best practice use google firebase auth feature which manages all the session, login and logout.
易于实施... 从谷歌免费... 由Google维护....
easy to implement... free from google... maintained by google....
这篇关于Angular4会话处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!