Closed atinux closed 1 month ago
Resolves #169
Adding a 3rd argument to setUserSession and replaceUserSession to overwrite the SessionConfig
setUserSession
replaceUserSession
SessionConfig
await setUserSession(event, { ... } , { maxAge: 60 * 60 * 24 * 7 // 1 week })
Resolves #47
It is now possible to set private data using the secure property in the session data:
secure
await setUserSession(event, { // User data user: { login: 'atinux' }, // Private data accessible on server/ routes secure: { apiToken: '1234567890' }, // Any extra fields for the session data loggedInAt: new Date() }) // Server-side const { secure, user } = await requireUserSession(event) // App-side const { session } = useUserSession() session.value.secure // undefined
Resolves #169
Adding a 3rd argument to
setUserSession
andreplaceUserSession
to overwrite theSessionConfig
Resolves #47
It is now possible to set private data using the
secure
property in the session data: