Invalidating JSON Web Tokens

前端 未结 28 2948
夕颜
夕颜 2020-11-22 06:17

For a new node.js project I\'m working on, I\'m thinking about switching over from a cookie based session approach (by this, I mean, storing an id to a key-value store conta

28条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 07:05

    IAM solution like Keycloak (which I'have worked on) provide Token Revocation endpoint like

    Token Revocation Endpoint /realms/{realm-name}/protocol/openid-connect/revoke

    Of if you simply want to logout an useragent(or user), you could call an endpoint as well(this would simply invalidate the Tokens). Again, in the case of Keycloak, the Relying Party just needs to call the endpoint

    /realms/{realm-name}/protocol/openid-connect/logout

    Link in case if you want to learn more

提交回复
热议问题