Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample code needs to be updated #56

Open
salientknight opened this issue Sep 19, 2019 · 0 comments
Open

Sample code needs to be updated #56

salientknight opened this issue Sep 19, 2019 · 0 comments

Comments

@salientknight
Copy link

salientknight commented Sep 19, 2019

The component works great, but the sample code needs to be updated. Domain needs to be changed to host and the code you are using to set the expires date does not return a valid date. I fixed both as follows — if you update the example you wont have to change the code at all. Best of luck and thank you :)

 const expires = new Date();
    expires.setDate(14); //14 days in the future
    cookie.save("cookie-name", "value", {
      path: "/",
      expires,
      host: "https://*.hostname"
    }); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant