I need to be able to store some authentication information in a cookie and set an expiration date.
From what I have seen the $cookie and $cookiestore doesn't support this.
Are there any alternatives or is the only way possible to do this on the server side?
I was hoping maybe there is a module that exposes this functionality?
Thanks in advance
jquery-cookie
makes this simple. To set a cookie that expires in 30 days,
$.cookie('auth', token, 30);
https://github.com/carhartl/jquery-cookie
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With