Need help with tokens

I am learning tokens got into cookie parser but it's not working
No description
5 Replies
RavenX
RavenX12mo ago
My view folder
No description
Electronic
Electronic12mo ago
Shouldn't you check if(token) since you've destructed it And what your trying to achieve isn't clear from what you wrote above
RavenX
RavenX12mo ago
Sorry to bother I have solved it my self I am just learning about tokens Using ejs was trying to render the ejs file according to them on having a cookie it would render logout page else it will render the login page When it collects the login button it generates a token
RavenX
RavenX12mo ago
No description
RavenX
RavenX12mo ago
This code fixed it