You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my access_token stored as a cookie in my angular v18 SSR app.
ngx-cookie-service-ssr logs correctly the cookies on the browser but an empty object on the server.
Is that incorrect way to process in v18 ?
Thank you in advance for your help !
Steps to Reproduce
I have installed ngx-cookie-service-ssr and when I console log in the app component the cookies, I get the cookies in the browser :
console.log(this.cookieService.getAll());
{
"access_token": "eyJhbGc..."
}
However, the same corresponding log on the server is empty:
{}
As describe in the README, I need to set the REQUEST and RESPONSE in the providers of server.ts :
Hello 👋 @louismeeckers Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible. Feel free to raise a PR if you can fix the issue
Describe the bug
I have my access_token stored as a cookie in my angular v18 SSR app.
ngx-cookie-service-ssr logs correctly the cookies on the browser but an empty object on the server.
Is that incorrect way to process in v18 ?
Thank you in advance for your help !
Steps to Reproduce
I have installed ngx-cookie-service-ssr and when I console log in the app component the cookies, I get the cookies in the browser :
console.log(this.cookieService.getAll());
However, the same corresponding log on the server is empty:
As describe in the README, I need to set the REQUEST and RESPONSE in the providers of server.ts :
This solution still print an empty object on the server.
For this reason, I made some research and added the following line at the top of my server.ts:
and set the providers like below so that ngx-cookie-service-ssr can catch them :
(fyi: console log req.cookies in server.get section print them correctly, so no issue on that side)
Please provide a link to a minimal reproduction of the bug. StackBlitz, CodePen or CodeSanBox
--
Expected behaviour
Printing the cookies with ngx-cookie-service on the server
What version of the library you see this issue?
18.0.0
What version of Angular are you using?
Angular 18
Screenshots
No response
Desktop? Please complete the following information
No response
Mobile? Please complete the following information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: