Files
edh-stats/frontend/tailwind.config.js
Michael Skrynski 2c0cd01ab2 Update version to 2.2.0 and migrate to session-based cookies
*   Bump backend package version to `2.2.0` in `package.json` and
    `package-lock.json`.
*   Replace local storage token management with secure HTTP-only
    cookies.
    *   Added cookie options to `@fastify/cookie` plugin configuration
        in `server.js` (request-time parsing, strict same-site,
        production enforcement).
    *   Updated `auth.js` routes to use `reply.setCookie` and
        `reply.clearCookie` instead of manual token handling.
    *   Added `request.headers.authorization` pre-handling hook to
        inject cookie tokens into the Authorization header for route
        handlers.
*   Updated `frontend/src/lib/stores/auth.js`:
    *   Switched token storage logic to rely solely on cookies via the
        browser (`credentials: 'include'`).
    *   Removed `localStroage` and `sessionStor`ge usage for the auth
        token.
    *   Refactored login/register flow to call `markAuthenticated()`
        immediately upon success.
    *   Updated logout to clear the backend cookie via
        `/api/auth/logout` and reset store state.
    *   Modified `checkRegistrationConfig` and other store methods to
        handle state updates correctly without local storage
        persistence.
*   Removed `localStroage` and `sessionStor`ge references from the
    frontend register page UI and validation logic.
    Update version to 2.2.0 and migrate to session-based cookies

Replace JWT token storage with HTTP-only session cookies in the backend.
Add `/session` endpoint to verify cookie-based authentication and remove
reliance on localStorage for client-side token management. Update
frontend auth store to handle cookies via `credentials: include` and
refresh tokens on 401 errors.
2026-04-11 20:08:29 +02:00

49 lines
1.2 KiB
JavaScript

/** @type {import('tailwindcss').Config} */
export default {
darkMode: 'media',
content: [
'./src/**/*.{html,js,svelte,ts}',
'./public/**/*.html',
'./public/**/*.js',
'./js/**/*.js'
],
theme: {
extend: {
colors: {
'mtg-white': '#F0E6D2',
'mtg-blue': '#0E68AB',
'mtg-black': '#2C2B2D',
'mtg-red': '#C44536',
'mtg-green': '#5A7A3B',
'mtg-gold': '#C8B991',
'mtg-colorless': '#BAB0AC',
'edh-primary': '#0f172a',
'edh-secondary': '#1e293b',
'edh-accent': '#3b82f6'
},
fontFamily: {
mtg: ['Georgia', 'serif']
},
animation: {
'fade-in': 'fadeIn 0.5s ease-in-out',
'slide-up': 'slideUp 0.3s ease-out',
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite'
},
keyframes: {
fadeIn: {
'0%': { opacity: '0' },
'100%': { opacity: '1' }
},
slideUp: {
'0%': { transform: 'translateY(10px)', opacity: '0' },
'100%': { transform: 'translateY(0)', opacity: '1' }
}
}
}
},
plugins: [
// require('@tailwindcss/forms'),
// require('@tailwindcss/typography'),
]
}