hanko
hanko copied to clipboard
Allow cookie name to be changed / configured
As requested in our community, it might help with adoption when it is possible to integrate Hanko completely transparent into an existing infrastructure.
To make this work we would have to:
- change the backend config to include a parameter for the cookie name https://github.com/teamhanko/hanko/blob/87a4003bae7d866d5a5b3674d4444705f331a604/backend/config/config.go#L162
- return the cookie name in the PublicConfig so the frontend has access to it (https://github.com/teamhanko/hanko/blob/87a4003bae7d866d5a5b3674d4444705f331a604/backend/dto/config.go#L8)
- Modify the frontend-sdk to use the given cookie name https://github.com/teamhanko/hanko/blob/ae510ad288f5a253b07dc9fedc3ed178517b7e34/frontend-sdk/src/lib/client/HttpClient.ts#L107
We would also need to change it in the session middleware: https://github.com/teamhanko/hanko/blob/a6f677ad680bfc6796e159265d0c7cb9f9f32988/backend/server/middleware/session.go#L13