@thinkingcat/auth-utils 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -297,6 +297,13 @@ function setCustomTokens(response, accessToken, optionsOrRefreshToken, options)
|
|
|
297
297
|
const accessTokenName = `${cookiePrefix}_access_token`;
|
|
298
298
|
response.cookies.delete(accessTokenName);
|
|
299
299
|
response.cookies.set(accessTokenName, accessToken, cookieOptions);
|
|
300
|
+
debugLog('setCustomTokens', `Set ${accessTokenName} cookie:`, {
|
|
301
|
+
hasValue: !!accessToken,
|
|
302
|
+
maxAge: cookieOptions.maxAge,
|
|
303
|
+
domain: cookieOptions.domain,
|
|
304
|
+
secure: cookieOptions.secure,
|
|
305
|
+
sameSite: cookieOptions.sameSite,
|
|
306
|
+
});
|
|
300
307
|
// refresh_token 설정 (있는 경우)
|
|
301
308
|
if (refreshTokenValue) {
|
|
302
309
|
const refreshTokenName = `${cookiePrefix}_refresh_token`;
|
|
@@ -305,6 +312,11 @@ function setCustomTokens(response, accessToken, optionsOrRefreshToken, options)
|
|
|
305
312
|
maxAge: 30 * 24 * 60 * 60, // refresh token: 30일
|
|
306
313
|
};
|
|
307
314
|
response.cookies.set(refreshTokenName, refreshTokenValue, refreshCookieOptions);
|
|
315
|
+
debugLog('setCustomTokens', `Set ${refreshTokenName} cookie:`, {
|
|
316
|
+
hasValue: !!refreshTokenValue,
|
|
317
|
+
maxAge: refreshCookieOptions.maxAge,
|
|
318
|
+
domain: refreshCookieOptions.domain,
|
|
319
|
+
});
|
|
308
320
|
}
|
|
309
321
|
}
|
|
310
322
|
/**
|
package/package.json
CHANGED