angular - ngx admin redirect if user session expire on server side
问题描述
I'm using ngx admin with it's nebular auth in Angular 6. Backend is in Laravel and using APIs for communication with each other.
My issue is when user stay inactive for a long time, his session expire on server but he still can navigate to angular pages with no data in them as API gives 401 Unauthorized error.
Is there any default way in this admin theme which provide this feature to check user login status and redirect him to logout page? Please guide.
I didn't added code here as I don't know which files you guys might want to see. So let me know if you need anything else.
解决方案
推荐阅读
- javascript - 关闭它的父窗口时,事件侦听器不在弹出窗口上工作
- python - 浏览网页的最佳(最快)方法是什么?
- laravel - 如何根据字段值从表中获取前 10 行?
- linux - OpenVPN 客户端无法在 Windows 计算机上运行?
- c# - 无法将具有一对一关系的模型与 Entity Framework Core 映射
- c# - 尝试为自定义 POCO 的简单列表获取 HashCode
- java - 从 Spring Boot 重定向角度页面时出现 CORS 错误:预检中 Access-Control-Allow-Headers 不允许标头字段内容类型
- python - 合并共享一个单元格值的 Python 3 DataFrame 行,将另一个值放入逗号分隔的数组中
- css - 猫头鹰旋转木马最后会产生空白空间
- ruby-on-rails - Axios post 工作,Axios put 没有通过预加载请求