summaryrefslogtreecommitdiff
path: root/internal/api/client/auth/util.go
blob: 48fe4748a8a755d30051dcec075616eaf0bc2e09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
	}
}