Skip to content

關於使用者登入API使用Token的相關問題 #4

@magicsung

Description

@magicsung

@magicsung 最近在用node js實作使用者登入,關於Token應該包含哪些東西,請問有大大可以提示一下嗎?
目前是只有把user ID包進Token,server收到token解開後用id去認user,這樣的做法妥當嗎?

@metavige 可以試試 jwt
https://github.com/auth0/node-jsonwebtoken
node-jsonwebtoken - JsonWebToken implementation for node.js http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions