hapijs / cookie

Cookie authentication plugin
Other
229 stars 100 forks source link

Use two different cookies for different consumer services #241

Open OriaLogic opened 3 years ago

OriaLogic commented 3 years ago

Support plan

Context

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