Mez
Mez3mo ago

usermez's Thread

Does anyone know what I am doing wrong? Somewhere in my convex function I have the following code.
const userId = await getAuthUserId(ctx);
const userId = await getAuthUserId(ctx);
When I try to write a unit test using convex-test, I can set the auth context as follows:
const ctx = t.withIdentity({ id: userId.toString(), tokenIdentifier: "test" });
const ctx = t.withIdentity({ id: userId.toString(), tokenIdentifier: "test" });
But when I compare the userIds they don't match. What am I missing?
1 Reply
convex-threads
convex-threads3mo ago
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. If this is a support question related question please create a post in #support-community. If not, carry on! Thanks

Did you find this page helpful?