Comments (3)
@reactleaner 多终端登就在redis存放的token key中加个终端的类型进行存放。
目前token的redis key是admin:token:${user.id}
,需要多终端可以改为admin:token:mp:${user.id}
,admin:token:web:${user.id}
等。
如果不需要考虑重复登录,就直接删除redis存放的token和删除判断redis中的token逻辑即可。
自行修改登录模块和授权守卫的逻辑。
from sf-nest-admin.
https://github.com/hackycy/sf-nest-admin/blob/dev/src/modules/admin/login/login.service.ts
https://github.com/hackycy/sf-nest-admin/blob/dev/src/modules/admin/core/guards/auth.guard.ts
from sf-nest-admin.
😃好的 感谢大佬细心解答!
from sf-nest-admin.
Related Issues (14)
- 前端的侧栏菜单的文本可以被选中 HOT 2
- 文档快速上手那边能否添加一个新模块的demo实现教程 HOT 1
- serve端报错 HOT 6
- sf-vue-admin issue 呢?关于table 封装的建议 HOT 2
- 跑起来了,任意接口报这个错误 HOT 4
- 为什么前后端js代码是两种风格呢 HOT 1
- FastifyWarning.fastify-formbody: fastify-formbody has been deprecated. Use @fastify/[email protected] instead. HOT 5
- sfadmin create后server无法加载 HOT 3
- nest-cli的生成模块功能无效 HOT 3
- 自定义了一个dto校验一直不通过,提示property id should not exist HOT 1
- 能否在项目里再启动一个websocket服务? HOT 1
- 怎么让AuthGuard不作用在所有接口? HOT 1
- 为什么要将菜单项放在后端呢?这样做有什么好处? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sf-nest-admin.