Git Product home page Git Product logo

Comments (3)

hackycy avatar hackycy commented on September 28, 2024

@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.

hackycy avatar hackycy commented on September 28, 2024

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.

reactleaner avatar reactleaner commented on September 28, 2024

😃好的 感谢大佬细心解答!

from sf-nest-admin.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.