【发布时间】:2020-01-02 13:41:09
【问题描述】:
我在登录注销认证时遇到了一些麻烦:-
我需要的逻辑:-
当用户关闭网络浏览器时,我需要在客户注销时从客户端到服务器的提示。
在应用程序中使用 angular 和 node。尝试使用 Unload、beforeUnload、Socket.io 函数。但我找不到明确的方法。
【问题讨论】:
-
您使用的是哪种授权方式?如果您在 localstorage 上存储令牌,只需删除
localstorage以便用户自动注销 -
这能回答你的问题吗? Logout when closing window in Angular 4
标签: node.js angular authentication oauth