Admin-UI : cannot set cookie

After starting the admin-ui and the keyclock configuration was done.
when we tried to log on, the cookie state cannot be set:
this.cookie.set(‘state’, stateParam, undefined, ‘/’);
Browser: Chrome
Version: 97.0.4692.99 (Build officiel) (64 bits)

and we get the following error: missing cookie state

Can you please share the command you have used to start?


The admin-ui has been started using ng serve inside visual code.
The admin-services has been started inside intellij
The keyclock is up and running and we can authenticate, but after we got this errros.
When i did a console.log of this cookie state, its empty.


To set the cookie in the browser you need to have a MODHEADER plugin in chrome.
This setup is required only for localhost as you mentioned using ng serve .
Keycloak and Application are running in two different port, so by default it doesn’t have a provision to set the cookie.