Igor Kotua
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
I will try to wrap this in Authenticated or prevent query from running if useConvexAuth returns {isAuthenticated: false}
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
Oh ok, that's a bit confusing. I thought ConvexProviderWithClerk is taking care of this
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
Basically this, nothing special
"use client";
import { useQuery } from "convex/react";
import { api } from "../../../convex/_generated/api";
import { useConvexAuth } from "convex/react";
export default function Page({ params }: { params: { id: string } }) {
const auth = useConvexAuth();
const data = useQuery(api.videos.getVideo, { videoId: params.id as any });
return (
<div>
<h1>Video</h1>
{JSON.stringify(data?.description)}
{JSON.stringify(auth)}
</div>
);
}
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
@Michal Srb well my client is authenticated, useConvexAuth hooks confirms that.
But my convex query still returns null from getUserIdentity
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
Let me know if you need more info 🙂
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
Also getConvexAuth on this page returns authenticated: true
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
15 replies
CCConvex Community
•Created by Igor Kotua on 2/19/2024 in #support-community
Issues with getUserIdentity inside queries (auth with Clerk)
This is my client setup
15 replies