mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 10:51:37 +00:00
Compare commits
No commits in common. "d0a3f747106f12227a55f3473f0e19f2055c378d" and "b1921e70349394bd46577a2125afd69077ebd606" have entirely different histories.
d0a3f74710
...
b1921e7034
1 changed files with 2 additions and 2 deletions
|
|
@ -12,9 +12,9 @@ class TokenManager {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
/** @type {number} Refresh token expiry in seconds */
|
/** @type {number} Refresh token expiry in seconds */
|
||||||
this.RefreshTokenExpiry = parseInt(process.env.REFRESH_TOKEN_EXPIRY) || 30 * 24 * 60 * 60 // 30 days
|
this.RefreshTokenExpiry = parseInt(process.env.REFRESH_TOKEN_EXPIRY) || 7 * 24 * 60 * 60 // 7 days
|
||||||
/** @type {number} Access token expiry in seconds */
|
/** @type {number} Access token expiry in seconds */
|
||||||
this.AccessTokenExpiry = parseInt(process.env.ACCESS_TOKEN_EXPIRY) || 1 * 60 * 60 // 1 hour
|
this.AccessTokenExpiry = parseInt(process.env.ACCESS_TOKEN_EXPIRY) || 12 * 60 * 60 // 12 hours
|
||||||
|
|
||||||
if (parseInt(process.env.REFRESH_TOKEN_EXPIRY) > 0) {
|
if (parseInt(process.env.REFRESH_TOKEN_EXPIRY) > 0) {
|
||||||
Logger.info(`[TokenManager] Refresh token expiry set from ENV variable to ${this.RefreshTokenExpiry} seconds`)
|
Logger.info(`[TokenManager] Refresh token expiry set from ENV variable to ${this.RefreshTokenExpiry} seconds`)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue