wechat-oauth icon indicating copy to clipboard operation
wechat-oauth copied to clipboard

mysql建表字段中的expires_in和create_at字段设置为varchar导致过期自动刷新token功能判断异常

Open yellowdoge1996 opened this issue 3 years ago • 0 comments

oauth.js26行的判断代码如下:

return !!this.data.access_token && (new Date().getTime()) < (this.data.create_at + this.data.expires_in * 1000);

(this.data.create_at + this.data.expires_in * 1000)这个代码在字符和数字时表现出来的结果是不一样的。

yellowdoge1996 avatar Aug 21 '22 07:08 yellowdoge1996