mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
@uppy/companion: fix cookie maxAge to milliseconds (#5746)
* fix: multiply authStateExpiry by 1000 when adding tokens to cookies * move multiplication --------- Co-authored-by: Mikael Finstad <finstaden@gmail.com>
This commit is contained in:
parent
6d37514016
commit
d1a3345263
1 changed files with 2 additions and 2 deletions
|
|
@ -108,10 +108,10 @@ function getCommonCookieOptions ({ companionOptions }) {
|
|||
|
||||
const getCookieName = (oauthProvider) => `uppyAuthToken--${oauthProvider}`
|
||||
|
||||
const addToCookies = ({ res, token, companionOptions, oauthProvider, maxAge = MAX_AGE_24H * 1000 }) => {
|
||||
const addToCookies = ({ res, token, companionOptions, oauthProvider, maxAge = MAX_AGE_24H }) => {
|
||||
const cookieOptions = {
|
||||
...getCommonCookieOptions({ companionOptions }),
|
||||
maxAge,
|
||||
maxAge: maxAge * 1000,
|
||||
}
|
||||
|
||||
// send signed token to client.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue