Sheng
Sheng
CCConvex Community
Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
Yea, probably the issue is due to missing isAuthenticated from your export there
22 replies
CCConvex Community
Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
Does your convex/auth.ts file have the isAuthenticated exported like this?
import { convexAuth } from "@convex-dev/auth/server";

export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
providers: [],
});
import { convexAuth } from "@convex-dev/auth/server";

export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
providers: [],
});
22 replies
CCConvex Community
Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
Yes, basically is just run some code before reaching the convex auth middleware
22 replies
CCConvex Community
Created by uma on 3/29/2025 in #support-community
callback, 3rd party authentication, convexAuth
How about this? It will check the pathname first, if matched then no need to go through the convex auth middleware.
export const middleware = async (req: NextRequest, event: NextFetchEvent) => {
if (req.nextUrl.pathname.startsWith("/settings/profile/figma-auth-callback")) {
// Do something here if needed
return NextResponse.next()
}

return convexAuthNextjsMiddleware(
async (request, { convexAuth }) => {
// ...
},
)(req, event)
}
export const middleware = async (req: NextRequest, event: NextFetchEvent) => {
if (req.nextUrl.pathname.startsWith("/settings/profile/figma-auth-callback")) {
// Do something here if needed
return NextResponse.next()
}

return convexAuthNextjsMiddleware(
async (request, { convexAuth }) => {
// ...
},
)(req, event)
}
22 replies