@hemia/auth-sdk 0.0.19 → 0.0.20
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.
|
@@ -192,8 +192,8 @@ let AuthService = class AuthService {
|
|
|
192
192
|
createdAt: new Date().toISOString(),
|
|
193
193
|
sessionId: session_id
|
|
194
194
|
};
|
|
195
|
-
const
|
|
196
|
-
await this.storage.set(`x-session:${sessionId}`, sessionData,
|
|
195
|
+
const ttlSeconds = session_expires_in || 604800;
|
|
196
|
+
await this.storage.set(`x-session:${sessionId}`, sessionData, ttlSeconds);
|
|
197
197
|
return {
|
|
198
198
|
sessionId,
|
|
199
199
|
expiresIn: expires_in,
|
|
@@ -376,8 +376,8 @@ let AuthService = class AuthService {
|
|
|
376
376
|
sessionId: session_id || '',
|
|
377
377
|
createdAt: Date.now().toString()
|
|
378
378
|
};
|
|
379
|
-
const
|
|
380
|
-
await this.storage.set(`x-session:${sessionId}`, updatedSession,
|
|
379
|
+
const ttlSeconds = session_expires_in || 604800;
|
|
380
|
+
await this.storage.set(`x-session:${sessionId}`, updatedSession, ttlSeconds);
|
|
381
381
|
return updatedSession;
|
|
382
382
|
}
|
|
383
383
|
};
|
package/dist/hemia-auth-sdk.js
CHANGED
|
@@ -194,8 +194,8 @@ exports.AuthService = class AuthService {
|
|
|
194
194
|
createdAt: new Date().toISOString(),
|
|
195
195
|
sessionId: session_id
|
|
196
196
|
};
|
|
197
|
-
const
|
|
198
|
-
await this.storage.set(`x-session:${sessionId}`, sessionData,
|
|
197
|
+
const ttlSeconds = session_expires_in || 604800;
|
|
198
|
+
await this.storage.set(`x-session:${sessionId}`, sessionData, ttlSeconds);
|
|
199
199
|
return {
|
|
200
200
|
sessionId,
|
|
201
201
|
expiresIn: expires_in,
|
|
@@ -378,8 +378,8 @@ exports.AuthService = class AuthService {
|
|
|
378
378
|
sessionId: session_id || '',
|
|
379
379
|
createdAt: Date.now().toString()
|
|
380
380
|
};
|
|
381
|
-
const
|
|
382
|
-
await this.storage.set(`x-session:${sessionId}`, updatedSession,
|
|
381
|
+
const ttlSeconds = session_expires_in || 604800;
|
|
382
|
+
await this.storage.set(`x-session:${sessionId}`, updatedSession, ttlSeconds);
|
|
383
383
|
return updatedSession;
|
|
384
384
|
}
|
|
385
385
|
};
|