blue-jay / blueprint

Blueprint for your next web application in Go.
https://blue-jay.github.io/
MIT License
481 stars 77 forks source link

Cookie stay when not using Flashes #61

Closed ghost closed 7 years ago

ghost commented 7 years ago
  1. Which commit are you using? e65ca2be88e353b2bad9c57b1c3c8f2e0e2a46ff

  2. Which operating system, processor architecture, and Go version are you using (go env)? Arch Linux, 64-bit, go1.8

  3. What did you do? I tried to build Blueprint without the Flashes.

  4. What did you expect to see? That the Logout works.

  5. What did you actually see? It seems like the Cookie doesn't get deleted.

josephspurrier commented 7 years ago

What changes did you make to the code so it does not use the flashes? The cookie holds more than just the cookie, it holds all the session information. When you click logout, it deletes everything inside the session, but doesn't delete the cookie itself.

ghost commented 7 years ago

Just take this line out: https://github.com/blue-jay/blueprint/blob/master/controller/login/login.go#L87

And the Logout doesn't work for me. Is it the same for you?

josephspurrier commented 7 years ago

Ah, you need to manually save the session: https://github.com/blue-jay/blueprint/blob/master/lib/flight/flight.go#L127

The FlashNotice() function does the saving for you.

ghost commented 7 years ago

Ah, thanks a lot. Didn't got that in the first place.