mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-13 11:22:14 +02:00
feat: add authentication for OSS (#167)
* feat: add authentication for OSS Fixes #157 and #156 * fix: fix token generation * fix: limit fastapi workers to 1
This commit is contained in:
parent
0791975864
commit
642cc34e8c
48 changed files with 994 additions and 303 deletions
|
|
@ -11,7 +11,7 @@ export const dynamic = 'force-dynamic';
|
|||
|
||||
export default async function Home() {
|
||||
logger.debug('[HomePage] Starting Home page render');
|
||||
const authProvider = getServerAuthProvider();
|
||||
const authProvider = await getServerAuthProvider();
|
||||
logger.debug('[HomePage] Auth provider:', authProvider);
|
||||
|
||||
// For local/OSS provider, check if user has workflows
|
||||
|
|
@ -39,6 +39,8 @@ export default async function Home() {
|
|||
logger.debug('[HomePage] Redirecting to /workflow/create - no workflows found');
|
||||
redirect('/workflow/create');
|
||||
}
|
||||
} else {
|
||||
redirect('/auth/login');
|
||||
}
|
||||
} catch (error) {
|
||||
// Re-throw navigation errors (redirects, not found, etc.) - they're intentional
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue