71c58ddb60
- Store authentication tokens explicitly before setting user state in login and TOTP verification flows to prevent race conditions - Add 'credentials: include' to WebAuthn endpoints for proper session cookie handling - Add comprehensive debug logging throughout authentication flow to trace token lifecycle and API requests - Update WebAuthn completeLogin to use fetch directly instead of request helper to properly handle session cookies - Add allowedHosts configuration to Vite dev server
20 lines
541 B
TypeScript
20 lines
541 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import path from "path";
|
|
import { componentTagger } from "lovable-tagger";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
server: {
|
|
host: "::",
|
|
port: 8080,
|
|
allowedHosts: process.env.VITE_ALLOWED_HOSTS?.split(",") || ["ui.webauthn.local"],
|
|
},
|
|
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
}));
|