SthapS
Convex Community7mo ago
37 replies
Sthap

Cannot read properties of null (reading 'redirect') in @convex-dev/auth/react `signIn` function

I am encountering a TypeError: Cannot read properties of null (reading 'redirect') when calling the
signIn
function from @convex-dev/auth/react in my Next.js application. The error occurs at the line where await signIn("password", formData) is called, and the stack trace points to an internal client.js file within the @convex-dev/auth library.

I have already tried the following:

- Ensured formData.set("redirectTo", "/dashboard") is passed to the signIn function (even if I remove the "redirectTo" it still gave me redirect error).
- Verified that my CONVEX_SITE_URL env is correctly set in my Convex deployment.

The error consistently points to an attempt to read a redirect property from a null object within the @convex-dev/auth/react library's internal code.
Was this page helpful?