Refactor the login handler
Compare changes
- ale authored
There is no point in using the complex gorilla/sessions machinery for storing a simple long-term cookie, just use gorilla/securecookie directly.
+ 62
− 16
@@ -10,21 +10,33 @@ import (
@@ -35,7 +47,7 @@ type Config struct {
@@ -45,26 +57,33 @@ func New(config *Config) (*Manager, error) {
@@ -75,7 +94,7 @@ func (m *Manager) GetDeviceInfoFromRequest(w http.ResponseWriter, req *http.Requ
@@ -103,6 +122,33 @@ func (m *Manager) GetDeviceInfoFromRequest(w http.ResponseWriter, req *http.Requ