gpt4 book ai didi

android - 如何在从应用程序注销时强制使 JWT token 过期而不存储在数据库中?

转载 作者:行者123 更新时间:2023-11-29 05:11:08 25 4
gpt4 key购买 nike

我使用JWT对我的应用程序进行授权,并将 token 存储在本地存储中,因为我的应用程序在ReactJS中,后端为goLang .

我不想将 token 存储在数据库中,但我已在注销时从本地存储中删除了 token 。

但是这样,我面临着如下问题。

I removed the token from local storage while logout but the user still accessible their token if he copied or hit the request using postman or any other application for rest APIs until token expired so I want to forcefully expire the toke while logging out so what can I do for this.

那么我能为此做些什么呢?

最佳答案

您必须自己管理这些代币。 Here是一些想法的链接。

关于android - 如何在从应用程序注销时强制使 JWT token 过期而不存储在数据库中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59676552/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com