Refactor the login handler
Compare changes
Files
2- 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.
+ 54
− 15
@@ -11,22 +11,33 @@ import (
@@ -52,26 +63,27 @@ func New(config *Config, urlPrefix string) (*Manager, error) {
@@ -82,7 +94,7 @@ func (m *Manager) GetDeviceInfoFromRequest(w http.ResponseWriter, req *http.Requ
@@ -110,6 +122,33 @@ func (m *Manager) GetDeviceInfoFromRequest(w http.ResponseWriter, req *http.Requ