hapijs / hapijs/cookie

Use two different cookies for different consumer services

Open
#241 0 comments 0 reactions 0 assignees View on GitHub
support
Dominant language
JavaScript
Stars
229
Forks
99
PR merge metrics
No merged PRs in 30d

Description

#### Support plan

* *is this issue currently blocking your project?* (yes/no): yes
* *is this issue affecting a production system?* (yes/no): yes

#### Context

* *node version*: 16.13
* *module version*: 10.0.0
* *environment* (e.g. node, browser, native): not relevant
* *used with* (e.g. hapi application, another framework, standalone, ...): hapi application
* *any other relevant information*:

#### How can we help?

Hi,

I have an application with a backoffice and multiple client facing websites.
The users of the websites log in using a cookie with `hapi-auth-cookie` module.
The admins of the backoffice also connect to the hapi server using a cookie.

From what I could see, there is no way to register two different strategies with the `hapi-auth-cookie` module and have two different cookies used.
Why isn't it possible to register using two different cookies ? One for the admins and one for the normal users ?

I have seen this related [issue](https://github.com/hapijs/cookie/issues/111) but I don't want to have different scopes really, I would like to have different cookies.
My API provides data for different services, and as such the cookies should simply be different and not related.

Regards,
Lucas

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.