diff --git a/convex/auth.ts b/convex/auth.ts index b714486..97548e1 100644 --- a/convex/auth.ts +++ b/convex/auth.ts @@ -2,6 +2,6 @@ import { convexAuth } from "@convex-dev/auth/server"; import { Password } from "@convex-dev/auth/providers/Password"; import Google from "@auth/core/providers/google"; -export const { auth, signIn, signOut, store } = convexAuth({ +export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({ providers: [Password, Google], }); diff --git a/docs/changelog.md b/docs/changelog.md index ee0ae9b..849876a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,2 +1,3 @@ 2026-02-03 16:43:46 - Fixed 'NoAuthProvider' error by adding Password provider to `convex/auth.config.ts`. 2026-02-03 16:46:52 - Added Google OAuth provider to `convex/auth.config.ts` to fix 'Provider google is not configured' error. +2026-02-03 17:05:00 - Exported 'isAuthenticated' from 'convex/auth.ts' to fix missing export error. diff --git a/middleware.ts b/middleware.ts index 889a1b1..c984e86 100644 --- a/middleware.ts +++ b/middleware.ts @@ -6,7 +6,11 @@ import { } from "@convex-dev/auth/nextjs/server"; const isSignInPage = createRouteMatcher(["/auth"]); -const isProtectedPage = createRouteMatcher(["/dashboard(.*)"]); +const isProtectedPage = createRouteMatcher([ + "/dashboard(.*)", + "/onboarding(.*)", + "/opportunities(.*)", +]); export default convexAuthNextjsMiddleware(async (request) => { if (isSignInPage(request) && (await isAuthenticatedNextjs())) { diff --git a/package-lock.json b/package-lock.json index a600ccc..5be101f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "clsx": "^2.1.1", "convex": "^1.31.7", "framer-motion": "^12.31.0", + "jose": "^6.1.3", "lucide-react": "^0.563.0", "mini-svg-data-uri": "^1.4.4", "next": "14.1.0", @@ -91,6 +92,15 @@ } } }, + "node_modules/@auth/core/node_modules/jose": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", + "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/@babel/code-frame": { "version": "7.28.6", "license": "MIT", @@ -141,6 +151,15 @@ } } }, + "node_modules/@convex-dev/auth/node_modules/jose": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", + "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", @@ -3346,9 +3365,9 @@ } }, "node_modules/jose": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", - "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", + "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" diff --git a/package.json b/package.json index 0ccbe91..20b3ddc 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "clsx": "^2.1.1", "convex": "^1.31.7", "framer-motion": "^12.31.0", + "jose": "^6.1.3", "lucide-react": "^0.563.0", "mini-svg-data-uri": "^1.4.4", "next": "14.1.0",