mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-19 08:28:10 +02:00
Initial Commit 🚀 🚀
This commit is contained in:
commit
4f2a629340
444 changed files with 76863 additions and 0 deletions
21
ui/src/stack.tsx
Normal file
21
ui/src/stack.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import "server-only";
|
||||
|
||||
import { StackServerApp } from "@stackframe/stack";
|
||||
|
||||
const authProvider = process.env.NEXT_PUBLIC_AUTH_PROVIDER;
|
||||
|
||||
function createStackApp() {
|
||||
if (authProvider === "local") {
|
||||
// Return a dummy object when using local auth to prevent build errors
|
||||
return {} as StackServerApp;
|
||||
}
|
||||
// Only initialize Stack Auth when actually using it
|
||||
return new StackServerApp({
|
||||
tokenStore: "nextjs-cookie",
|
||||
urls: {
|
||||
afterSignIn: "/after-sign-in"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export const stackServerApp = createStackApp();
|
||||
Loading…
Add table
Add a link
Reference in a new issue