fix: ensure access and refresh cookie values are strings before assignment
This commit is contained in:
parent
7f829b32d4
commit
cb6d03458f
1 changed files with 2 additions and 2 deletions
|
@ -127,8 +127,8 @@ async function authenticate(
|
||||||
const secretKey = setting.jwt_secretkey;
|
const secretKey = setting.jwt_secretkey;
|
||||||
const accessCookie = cookie[accessTokenName];
|
const accessCookie = cookie[accessTokenName];
|
||||||
const refreshCookie = cookie[refreshTokenName];
|
const refreshCookie = cookie[refreshTokenName];
|
||||||
const accessValue = accessCookie?.value;
|
const accessValue = typeof accessCookie?.value === 'string' ? accessCookie.value : undefined;
|
||||||
const refreshValue = refreshCookie?.value;
|
const refreshValue = typeof refreshCookie?.value === 'string' ? refreshCookie.value : undefined;
|
||||||
|
|
||||||
const guestUser: PayloadInfo = {
|
const guestUser: PayloadInfo = {
|
||||||
username: "",
|
username: "",
|
||||||
|
|
Loading…
Add table
Reference in a new issue