Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

token key使用ip #13

Open
sanergogogo opened this issue Aug 9, 2023 · 3 comments
Open

token key使用ip #13

sanergogogo opened this issue Aug 9, 2023 · 3 comments
Labels
good first issue Good for newcomers question Further information is requested

Comments

@sanergogogo
Copy link

Redis::setex($cacheKey . ':' . request()->getRealIp(), $args['cache_token_ttl'], $args['access_token']);
自己项目改一下很简单,但是感觉作为插件不是很合适
比如"JWT:TOKEN:1000:127.0.0.1"
当用户切换wifi和移动网络的时候,原token就失效了,然后就需要刷新token或者重新生成token。

@Tinywan
Copy link
Owner

Tinywan commented Aug 13, 2023

那这个有什么好的解决办法吗?

@Tinywan Tinywan added good first issue Good for newcomers question Further information is requested labels Aug 13, 2023
@sanergogogo
Copy link
Author

最简单的就是不要+ip作为key.
这个肯定是根据业务来定的了,我的意思是作为插件还是不能固定写死比较好,最好能提供接口或者配置方案

@Tinywan
Copy link
Owner

Tinywan commented Aug 15, 2023

目前没时间去整

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants