func (s *Storage) CreateAppSession() (*model.Session, error) {
	session := model.Session{
		ID: crypto.GenerateRandomString(32),
		Data: &model.SessionData{
			CSRF: crypto.GenerateRandomString(64),
		},
	}
	return s.createAppSession(&session)
}
CreateAppSession creates a new application session.
package storage  
import (
	"database/sql"
	"fmt"
	"miniflux.app/crypto"
	"miniflux.app/model"
)
func (s *Storage) CreateAppSessionWithUserPrefs(userID int64) (*model.Session, error) {
	user, err := s.UserByID(userID)
	if err != nil {
		return nil, err
	}
	session := model.Session{
		ID: crypto.GenerateRandomString(32),
		Data: &model.SessionData{
			CSRF:     crypto.GenerateRandomString(64),
			Theme:    user.Theme,
			Language: user.Language,
		},
	}
	return s.createAppSession(&session)
}