package auth

import (
	"time"

	"github.com/alexedwards/scs/pgxstore"
	"github.com/alexedwards/scs/v2"
	"source.gleipnir.technology/Gleipnir/nidus-sync/db"
)

var sessionManager *scs.SessionManager

func NewSessionManager() *scs.SessionManager {
	sessionManager = scs.New()
	sessionManager.Store = pgxstore.New(db.PGInstance.PGXPool)
	sessionManager.Lifetime = 24 * time.Hour
	return sessionManager
}
