stevermeister / ngx-cookie-service

Angular (4.2+ ...12) service for cookies. Originally based on the `ng2-cookies` library.
https://www.npmjs.com/package/ngx-cookie-service
MIT License
547 stars 90 forks source link

ngx-cookie-service-ssr is it possible to use this in angular V10? #244

Closed codeintelli closed 2 years ago

codeintelli commented 2 years ago

Is your feature request related to a problem? Please describe

When we are using ngx-cookie-service it will not be working in Server Side rendering as you mentioned in your Readme.md, if we want to use this library in SSR we need to add one more library and when I install this library it shows a warning log like

Screenshot 2022-07-26 at 4 32 14 PM

Can you provide me more details regarding this?

Describe the solution you'd like

To work this library in angular 8+ version with SSR Support.

Describe alternatives you've considered

Not using any alternative

Additional context

No response

github-actions[bot] commented 2 years ago

Hello 👋 @CodeIntelli
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

pavankjadda commented 2 years ago

@CodeIntelli it was designed to use Angular 14 or later. But it should work in v10 with the warning you see.

codeintelli commented 2 years ago

Hey @pavankjadda, first of all, thanks for your response. Here I have used this package but it's not working in SSR

pavankjadda commented 2 years ago

Hey @pavankjadda, first of all, thanks for your response. Here I have used this package but it's not working in SSR

What part not working? Do you see any error?

codeintelli commented 2 years ago

I want to load the whole page response from the server and I have completed this (without authorization) API Endpoint but the main difference is that in many APIs which will be required a token to authorize the request at that time i am sending token using cookie but it show undefined. means the token is not able to send to the server. But when i am dealing with Client Side Rendering It will be working properly.

pavankjadda commented 2 years ago

I want to load the whole page response from the server and I have completed this (without authorization) API Endpoint but the main difference is that in many APIs which will be required a token to authorize the request at that time i am sending token using cookie but it show undefined. means the token is not able to send to the server. But when i am dealing with Client Side Rendering It will be working properly.

Could you share a sample repo that reproduces that issue? I am unable to reproduce it.

codeintelli commented 2 years ago

I have sorted the issue. now i can get the token from angular server using Express request and store token from this library

@pavankjadda Thanks for your Support