refactor: streamline authentication logic in dashboard and login routes by removing unnecessary error handling and improving user session validation, enhancing code clarity and maintainability

This commit is contained in:
2025-12-17 11:28:08 -03:00
parent 9072619e26
commit 551a2fed00
3 changed files with 21 additions and 29 deletions

View File

@@ -8,8 +8,6 @@ import { type MutationCtx, type QueryCtx, query } from './_generated/server';
// Usar SITE_URL se disponível, caso contrário usar CONVEX_SITE_URL ou um valor padrão
const siteUrl = process.env.SITE_URL || process.env.CONVEX_SITE_URL || 'http://localhost:5173';
console.log('siteUrl:', siteUrl);
// The component client has methods needed for integrating Convex with Better Auth,
// as well as helper methods for general use.
export const authComponent = createClient<DataModel>(components.betterAuth);