oidc now working

This commit is contained in:
tsmethurst 2021-07-22 16:03:53 +02:00
commit 20bf141512
10 changed files with 211 additions and 79 deletions

View file

@ -2,17 +2,14 @@ package auth
import (
"github.com/gin-contrib/sessions"
"github.com/superseriousbusiness/gotosocial/internal/router"
)
func (m *Module) clearSession(s sessions.Session) {
for _, key := range sessionKeys {
s.Delete(key)
}
s.Clear()
newOptions := router.SessionOptions(m.config)
newOptions.MaxAge = -1 // instruct browser to delete cookie immediately
s.Options(newOptions)
// 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)