Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom cookie name for the session #75

Open
kryopix opened this issue Oct 18, 2024 · 1 comment
Open

Custom cookie name for the session #75

kryopix opened this issue Oct 18, 2024 · 1 comment

Comments

@kryopix
Copy link

kryopix commented Oct 18, 2024

Hello,

I noticed that the session cookie name is currently hardcoded as nuxt-oidc-auth:

const sessionName = 'nuxt-oidc-auth'

I was wondering if there is a way to customize this cookie name?

The issue I am facing is that multiple services, which are proxied under the same host address, are using the same cookie. As a result, these services overwrite each other's sessions when accessed, causing conflicts.

Is there any existing option or workaround that would allow me to set a custom cookie name for the session, or could this be added as a feature?

Thank you in advance for your help, and thank you for all the great work on this module!

@nathanbrizzee-cdcr
Copy link

This would be a great addition! I have some use cases where I too would like to be able to customize the session name to prevent overwriting of the session. Even if it was set using an environment variable, that would be one way to set it without a lot of code changes. Itwould be a super simple way to do it although probably not the most appropriate. My guess would be that nuxt.config.ts would be a better place to do it long term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants