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

Set a JWT in your guest logic #76

Open
Fweddi opened this issue Aug 16, 2019 · 0 comments
Open

Set a JWT in your guest logic #76

Fweddi opened this issue Aug 16, 2019 · 0 comments

Comments

@Fweddi
Copy link

Fweddi commented Aug 16, 2019

Handler.js, lines 164-167:

function guestLogic(req, res){
  res.writeHead(302, { Location: "/", 'Set-Cookie': 'logged_in=false' });
  res.end();
}

Because you're not setting this as a JWT you can end up with two cookies, one for being a guest and one for being logged in:

Screenshot 2019-08-16 at 10 33 51

It's amazing that you've managed to get the JWTs to work for the login route; it might be easier if you add this to the guest route too so there are no bugs later down the line.

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