diff --git a/convex/auth.config.ts b/convex/auth.config.ts
index 79f33dfd..15e311b5 100644
--- a/convex/auth.config.ts
+++ b/convex/auth.config.ts
@@ -2,10 +2,8 @@
export default {
providers: [
{
- type: "customJwt",
- issuer: process.env.WORKOS_ISSUER_URL || "https://api.workos.com/sso",
- jwks: `https://api.workos.com/sso/jwks/${process.env.WORKOS_CLIENT_ID}`,
- algorithm: "RS256",
+ domain: `https://api.stack-auth.com/api/v1/projects/${process.env.NEXT_PUBLIC_STACK_PROJECT_ID}`,
+ applicationID: "convex",
},
],
};
diff --git a/src/app/actions.ts b/src/app/actions.ts
index 7245842c..239d9198 100644
--- a/src/app/actions.ts
+++ b/src/app/actions.ts
@@ -1,12 +1,9 @@
"use server";
-import { getSignInUrl, getSignUpUrl } from "@workos-inc/authkit-nextjs";
-
export async function getSignInUrlAction() {
- return await getSignInUrl();
+ return "/handler/sign-in";
}
export async function getSignUpUrlAction() {
- return await getSignUpUrl();
+ return "/handler/sign-up";
}
-
diff --git a/src/app/auth/callback/route.ts b/src/app/auth/callback/route.ts
deleted file mode 100644
index 52c24f2d..00000000
--- a/src/app/auth/callback/route.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { handleAuth } from '@workos-inc/authkit-nextjs';
-
-export const GET = handleAuth({
- returnPathname: '/',
-});
-
diff --git a/src/app/dashboard/subscription/page.tsx b/src/app/dashboard/subscription/page.tsx
index ce36d8a3..8bee2a56 100644
--- a/src/app/dashboard/subscription/page.tsx
+++ b/src/app/dashboard/subscription/page.tsx
@@ -2,7 +2,7 @@
import { useQuery } from "convex/react";
import { api } from "@/convex/_generated/api";
-import { useAuth } from "@workos-inc/authkit-nextjs/components";
+import { useUser } from "@stackframe/stack";
import { format } from "date-fns";
import {
Card,
@@ -19,7 +19,7 @@ import { Loader2, CheckCircle2, XCircle, Clock } from "lucide-react";
import Link from "next/link";
export default function SubscriptionPage() {
- const { user } = useAuth();
+ const user = useUser();
const subscription = useQuery(api.subscriptions.getSubscription);
const usage = useQuery(api.usage.getUsage);
diff --git a/src/app/handler/[...stack]/page.tsx b/src/app/handler/[...stack]/page.tsx
new file mode 100644
index 00000000..376e1416
--- /dev/null
+++ b/src/app/handler/[...stack]/page.tsx
@@ -0,0 +1,6 @@
+import { StackHandler } from "@stackframe/stack";
+import { stackTheme } from "@/stack-theme";
+
+export default function StackHandlerPage() {
+ return