-
Notifications
You must be signed in to change notification settings - Fork 0
Cookies #11
Comments
Okay, so I've had a bit of time to look into this and I found this library that allows cookie signing with this one. It looks like it'll be some work to implement, especially considering I know nothing about managing cookies. |
Turns out Express has its own cookie parser library it bundles with. It would be better to use that than to throw in yet more dependencies, so I'm going to try using that first. |
After looking at the cookie parser library and the response.cookie() API here I have realized that I will need to rework how the whole login method works. The way to set a cookie is on a response to a request made by the browser. I should be able to make the modal make a request using $.ajax and, if the response contains a cookie, that should work. Further work has found that I will need to (and really should) replace all of the communication with sockets with GET/POST requests and responses as per issue #20 before I can complete this. Therefore I am basically needing to rework the whole codebase to do this. It is a necessary thing, however, and I think I have learned my lesson. |
Fixed in latest update with version 0.6.0. |
Basically, if I refresh the teacher or admin pages, I have to type the password in again. I know nothing of setting cookies or the like, but perhaps there would be a way of providing authentication cookies for that particular page.
Plus: if the cookie for the queue admin page authenticates you for the teacher page as well, but not the other way around.
The text was updated successfully, but these errors were encountered: