gotosocial/internal/api/client/auth/util.go

17 lines
330 B
Go
Raw Normal View History

2021-07-22 11:52:17 +02:00
package auth
import (
"github.com/gin-contrib/sessions"
)
func (m *Module) clearSession(s sessions.Session) {
2021-07-22 16:03:53 +02:00
s.Clear()
2021-07-22 11:52:17 +02:00
2021-07-22 16:03:53 +02:00
// newOptions := router.SessionOptions(m.config)
// newOptions.MaxAge = -1 // instruct browser to delete cookie immediately
// s.Options(newOptions)
2021-07-22 11:52:17 +02:00
if err := s.Save(); err != nil {
panic(err)
}
}