diff options
Diffstat (limited to 'internal/api/client/auth/util.go')
-rw-r--r-- | internal/api/client/auth/util.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/api/client/auth/util.go b/internal/api/client/auth/util.go new file mode 100644 index 000000000..48fe4748a --- /dev/null +++ b/internal/api/client/auth/util.go @@ -0,0 +1,17 @@ +package auth + +import ( + "github.com/gin-contrib/sessions" +) + +func (m *Module) clearSession(s sessions.Session) { + s.Clear() + + // newOptions := router.SessionOptions(m.config) + // newOptions.MaxAge = -1 // instruct browser to delete cookie immediately + // s.Options(newOptions) + + if err := s.Save(); err != nil { + panic(err) + } +} |