In many of my previous projects with auth I used localstorage or sessionstorage to store the JWT. Trying to use http only secure cookies, the only issue I am running into is trying to a seperate header component from a login component. For example, using localstorage or sessionstorage I would often have a hea…
Tag: cookies
For some reason document.cookie not working
I have a cookie that gets set in the server on a successful logon to a complex PWA. However I am having trouble deleting that cookie from within the browser on log off. In order to test that further I have a (psuedo – by which I mean its still the original index.html, but using web components I can simu…
How can I keep the session logged in by inserting the user id inside a cookie?
I try to stay logged into my university session by avoiding entering my password. The point is that every week we reset the password for a 10-character password and it is very annoying to have to search for these reset passwords in the emails. So what me and my sister came up with is to avoid entering the pas…
JavaScript get cookies function
I’ve been learning on how to get Cookies from a web page. Below is the code extracted from w3schools.com. I am not sure why they used this line of code in the getCookies(cname) function as shown below. Why should there be a blank space at the start of every string in the array “ca”? And why …
How do I fix the warning “Cookie ‘cookie_name’ will be rejected soon …” that I get after deleting the cookie?
Firefox throws the following warning after deleting a valid cookie: Cookie “cookie_name” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTT…
Chrome not saving cookies in localhost
I know this has been asked before but none of the solutions named work. I am using Spring boot and React for my webapp, and need to set cookies on the website. I am developing and testing using Google Chrome. When I get the response from the server, the cookie is present and visible. However it is not saved i…
Creating cookie with a form values makes a null cookie
First of all, i need to create a cookie with a values that are in a form, and a lot of values are in a radio input type, but i ran into a problem with creating it. Here is the code: i got the code for all the functions from tutorialrepublic.com except the last one, which i made on my
Javascript, localStorage problem. Works on desktop but not on mobile
I’m using an esp32 microcontroller for my web server backend. I use a template processor function to build the page on the backend because i can’t use more then 8 socket connection because the MCU will crash. In order to load my page faster, i try to save a relatively huge language JSON file on th…
Koa & Passport Missing credentials
I have a Koa server that uses Passport to authenticate users against an Array, and a React client. After successful login, the following requests are not authenticated as the cookie is undefined. The authenticate function’s error parameter has: After browsing the site, I fixed the usual errors, calling …
Need simple modification for Javascript Cookie notice wordpress plugin
I followed a tutorial to create cookie notice popup for my wordpress site, it works as expected, I’m not good at javascript, so I want after user click on X button and accept cookies, to be automatically redirected to the same page with ?ok=3 query <script>cookieLaw={dId:”cookie-law-div̶…