fix: Correct expiresIn calculation for WeChat Mini Program token. (#2814)

This commit is contained in:
Will.Feng 2024-03-17 22:20:21 +08:00 committed by GitHub
parent d1c55d5aa7
commit 2c4b1093ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -715,7 +715,7 @@ func GetWechatMiniProgramToken(application *Application, code string, host strin
Code: session.SessionKey, // a trick, because miniprogram does not use the code, so use the code field to save the session_key
AccessToken: accessToken,
RefreshToken: refreshToken,
ExpiresIn: application.ExpireInHours * 60,
ExpiresIn: application.ExpireInHours * hourSeconds,
Scope: "",
TokenType: "Bearer",
CodeIsUsed: true,