cookie icon indicating copy to clipboard operation
cookie copied to clipboard

Use two different cookies for different consumer services

Open OriaLogic opened this issue 3 years ago • 0 comments

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 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

OriaLogic avatar Nov 16 '21 19:11 OriaLogic