Ran AI analysis, is it accurate? @inner fox
"1. expectAuth behavior
From node_modules/convex/dist/cjs-types/browser/sync/client.d.ts:
/**
*
* Whether query, mutation, and action requests should be held back
* until the first auth token can be sent.
*
*/
expectAuth?: boolean;
So with expectAuth: true, the client holds back query, mutation, and action requests until it has an auth token.
- signIn uses authenticatedCall
From node_modules/@convex-dev/auth/dist/react/client.js:
const signIn = useCallback(async (provider, args) => {
const params = args instanceof FormData
? Array.from(args.entries()).reduce((acc, [key, value]) => {
acc[key] = value;
return acc;
}, {})
: args ?? {};
const verifier = (await storageGet(VERIFIER_STORAGE_KEY)) ?? undefined;
await storageRemove(VERIFIER_STORAGE_KEY);
const result = await client.authenticatedCall("auth:signIn", { provider, params, verifier });
So signIn calls client.authenticatedCall("auth:signIn", ...).
- authenticatedCall uses the main client
From node_modules/@convex-dev/auth/dist/react/index.js:
const authClient = useMemo(() => ({
authenticatedCall(action, args) {
return client.action(action, args);
},
unauthenticatedCall(action, args) {
return new ConvexHttpClient(client.address, {
logger: client.logger,
}).action(action, args);
},
So:
authenticatedCall → client.action() (the main ConvexReactClient)
unauthenticatedCall → ConvexHttpClient.action() (separate HTTP client)
- Putting it together
With expectAuth: true, the main client does not send actions until it has an auth token.
signIn uses authenticatedCall, which goes through that main client.
Before sign-in, there is no token, so the auth:signIn action is never sent and the flow hangs."