Skip to content

Session Cookie Options #1458

@pdawson

Description

@pdawson

What problem is this solving

When a session cookie is minted within Auth on the server, the options of that cookie are hardcoded

setCookie(event, AUTH_COOKIE_NAME, cookie, {
    maxAge: AUTH_COOKIE_MAX_AGE,
    secure: true,
    httpOnly: true,
    path: "/",
    sameSite: "lax"
});

Proposed solution

Allow us to specify options for said cookie within config for auth, e.g.

vuefire: {
    auth: {
        enabled: true,
        sessionCookie: true,
        cookieOptions: {
            sameSite: 'strict',
        },
    },
},

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions