fix: Export isAuthenticated from convex/auth.ts to resolve a missing export error and add jose as a new dependency.
This commit is contained in:
@@ -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],
|
||||
});
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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())) {
|
||||
|
||||
25
package-lock.json
generated
25
package-lock.json
generated
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user