Curious what that last Authenticate message looks like (from following the steps here https://docs.convex.dev/auth/debug#step-2-check-whether-authentication-works-on-the-frontend)
Sounds like for some reason it's not a valid ID token
7 messages · Page 1 of 1 (latest)
Curious what that last Authenticate message looks like (from following the steps here https://docs.convex.dev/auth/debug#step-2-check-whether-authentication-works-on-the-frontend)
Sounds like for some reason it's not a valid ID token
@swift bronze the last one is not correct, but the second last one is correct
Can you share more of your Clerk set up? Like wherever you're instantiating your ConvexProviderWithClerk?
it is in the main.tsx:
createRoot(document.getElementById("root")!).render(
<StrictMode>
<ClerkProvider publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY}>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
<PayPalScriptProvider options={initialOptions}>
<App />
</PayPalScriptProvider>
</ConvexProviderWithClerk>
</ClerkProvider>
</StrictMode>
);
the whole file:
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import { App } from "./App.tsx";
import { initDiscordSdk } from "./configs/discord";
import { convex } from "./configs/convex";
import { ClerkProvider, useAuth } from "@clerk/clerk-react";
import { ConvexProviderWithClerk } from "convex/react-clerk";
import { PayPalScriptProvider } from "@paypal/react-paypal-js";
initDiscordSdk();
const initialOptions = {
clientId: import.meta.env.VITE_PAYPAL_CLIENT_ID,
disableFunding: ["card", "paylater"],
buyerCountry: "US",
currency: "USD",
dataPageType: "product-details",
components: "buttons",
dataSdkIntegrationSource: "developer-studio",
};
createRoot(document.getElementById("root")!).render(
<StrictMode>
<ClerkProvider publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY}>
<ConvexProviderWithClerk client={convex} useAuth={useAuth}>
<PayPalScriptProvider options={initialOptions}>
<App />
</PayPalScriptProvider>
</ConvexProviderWithClerk>
</ClerkProvider>
</StrictMode>
);
Hmm that all looks right so far. And there's nothing calling setAuth on convex directly? 1234 seems like the type of value that gets accidentally set somewhere vs. something that the clerk hook would return
(I guess curious if ./configs/convex has anything interesting or not)
This sounds like some example code from a previous conversation we had @thorn ledge? sounds like some code somewhere says setAuth(() => '1234')