@dotpress/auth 1.2.0 → 1.2.1

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.
@@ -81,7 +81,7 @@ export const registerHandlers = (plugin) => {
81
81
  });
82
82
  }
83
83
  if (mode === 'cookie') {
84
- setAuthCookies(res, { accessToken, refreshToken }, settings.accessTokenTTL);
84
+ setAuthCookies(res, { accessToken, refreshToken }, settings.refreshTokenTTLInDays * 24 * 60 * 60);
85
85
  }
86
86
  const expiration = calculateExpiration(settings.accessTokenTTL);
87
87
  return {
@@ -130,7 +130,7 @@ export const registerHandlers = (plugin) => {
130
130
  setAuthCookies(res, {
131
131
  accessToken: tokens.accessToken,
132
132
  refreshToken: tokens.refreshToken,
133
- }, settings.accessTokenTTL);
133
+ }, settings.refreshTokenTTLInDays * 24 * 60 * 60);
134
134
  }
135
135
  const expiration = calculateExpiration(settings.accessTokenTTL);
136
136
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotpress/auth",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "JWT Authentication plugin for Dotpress library",
5
5
  "author": "Renaud Guyon",
6
6
  "license": "MIT",