Sahag98
Sahag98
CCConvex Community
Created by Sahag98 on 11/15/2024 in #support-community
GetUserIdentity null
Layout.tsx
import "./globals.css";
import { ConvexClientProvider } from "./convex-provider";
import { Toaster } from "@/components/ui/toaster";
import { SidebarProvider } from "@/components/ui/sidebar";
import NextTopLoader from "nextjs-toploader";
import { TooltipProvider } from "@/components/ui/tooltip";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<ConvexClientProvider>
<html lang="en">
<body className="max-w-[2800px] flex items-center justify-center">
<SidebarProvider>
<TooltipProvider>
{/* <SidebarTrigger /> */}
{/* <AppSidebar /> */}
<NextTopLoader color="black" />
{children}
<Toaster />
</TooltipProvider>
</SidebarProvider>
</body>
</html>
</ConvexClientProvider>
);
}
import "./globals.css";
import { ConvexClientProvider } from "./convex-provider";
import { Toaster } from "@/components/ui/toaster";
import { SidebarProvider } from "@/components/ui/sidebar";
import NextTopLoader from "nextjs-toploader";
import { TooltipProvider } from "@/components/ui/tooltip";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<ConvexClientProvider>
<html lang="en">
<body className="max-w-[2800px] flex items-center justify-center">
<SidebarProvider>
<TooltipProvider>
{/* <SidebarTrigger /> */}
{/* <AppSidebar /> */}
<NextTopLoader color="black" />
{children}
<Toaster />
</TooltipProvider>
</SidebarProvider>
</body>
</html>
</ConvexClientProvider>
);
}
And the provider:
"use client";

import { ClerkProvider, useAuth } from "@clerk/clerk-react";
import { ConvexProviderWithClerk } from "convex/react-clerk";
import { ConvexReactClient } from "convex/react";
import { ReactNode } from "react";

const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export function ConvexClientProvider({ children }: { children: ReactNode }) {
return (
<ClerkProvider
publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY!}
>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
{children}
</ConvexProviderWithClerk>
</ClerkProvider>
);
}
"use client";

import { ClerkProvider, useAuth } from "@clerk/clerk-react";
import { ConvexProviderWithClerk } from "convex/react-clerk";
import { ConvexReactClient } from "convex/react";
import { ReactNode } from "react";

const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export function ConvexClientProvider({ children }: { children: ReactNode }) {
return (
<ClerkProvider
publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY!}
>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
{children}
</ConvexProviderWithClerk>
</ClerkProvider>
);
}
5 replies
CCConvex Community
Created by Sahag98 on 11/15/2024 in #support-community
GetUserIdentity null
I'm using convex and clerk. The whole app is wrapped inside a convexclerkprovider
5 replies
CCConvex Community
Created by Sahag98 on 10/11/2023 in #support-community
I'm getting this error in the console when I try to sign in with Clerk
Also the framework I'm using is nextjs 13
8 replies
CCConvex Community
Created by Sahag98 on 10/11/2023 in #support-community
I'm getting this error in the console when I try to sign in with Clerk
Also useConvexAuth is returning false
8 replies
CCConvex Community
Created by Sahag98 on 10/11/2023 in #support-community
I'm getting this error in the console when I try to sign in with Clerk
Hey @Michal Srb, this is what I have in that file export default { providers: [ { domain: process.env.CLERK_JWT_ISSUER_DOMAIN, applicationID: "convex", }, ], };
8 replies