@vritti/api-sdk 0.1.5 → 0.1.6
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.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -109,7 +109,8 @@ var defaultConfig = {
|
|
|
109
109
|
refreshCookieMaxAge: 30 * 24 * 60 * 60 * 1e3,
|
|
110
110
|
refreshCookiePath: "/",
|
|
111
111
|
refreshCookieSecure: process.env.NODE_ENV === "production",
|
|
112
|
-
refreshCookieSameSite: "strict"
|
|
112
|
+
refreshCookieSameSite: "strict",
|
|
113
|
+
refreshCookieDomain: "localhost"
|
|
113
114
|
},
|
|
114
115
|
jwt: {
|
|
115
116
|
accessTokenExpiry: "15m",
|
|
@@ -158,13 +159,17 @@ function resetConfig() {
|
|
|
158
159
|
}
|
|
159
160
|
__name(resetConfig, "resetConfig");
|
|
160
161
|
function getRefreshCookieOptions() {
|
|
161
|
-
|
|
162
|
+
const options = {
|
|
162
163
|
httpOnly: true,
|
|
163
164
|
secure: currentConfig.cookie.refreshCookieSecure,
|
|
164
165
|
sameSite: currentConfig.cookie.refreshCookieSameSite,
|
|
165
166
|
path: currentConfig.cookie.refreshCookiePath,
|
|
166
167
|
maxAge: currentConfig.cookie.refreshCookieMaxAge
|
|
167
168
|
};
|
|
169
|
+
if (currentConfig.cookie.refreshCookieDomain) {
|
|
170
|
+
options.domain = currentConfig.cookie.refreshCookieDomain;
|
|
171
|
+
}
|
|
172
|
+
return options;
|
|
168
173
|
}
|
|
169
174
|
__name(getRefreshCookieOptions, "getRefreshCookieOptions");
|
|
170
175
|
function getJwtExpiry() {
|