uncle
CCConvex Community
•Created by uncle on 4/2/2025 in #support-community
getUserIdentity returning null on certain page but not on home page. Using Convex with Clerk.
Hello,
I am using Clerk auth with Convex and am accessing Google Calendar events. On the home page, I have a Calendar component that executes a listCalendarEvents action in my google.ts backend file. This function calls getUserIdentity to retrieve the user_id and pass that into the getUserOauthAccessToken function to retrieve the access token. This Calendar component is wrapped in the Authenticated component as follows:
As a result, the listCalendarEvents and the getUserIdentity function work fine. However, when I navigate to another page (using the useRouter hook), trying to execute similar google.ts functions that also call getUserIdentity just return null. I've tried wrapping my components with the Authenticated component but that didn't work. I've also tried out using the "skip" whenever I do useQuery. Any suggestions?
Thank you! (sorry for the lenghty message)
2 replies
CCConvex Community
•Created by uncle on 3/27/2025 in #support-community
Getting Authorization Code from redirect URI (using Convex Auth w/ Google Provider)

3 replies