MietzeKatzeM
Convex Community5mo ago
6 replies
MietzeKatze

convex better auth - website reloads on signIn

Hi there,

so I finally managed to signIn as a user with convex-better auth. The problem I have is that it is immediatly reloading the page, and then it will not remember my sign in.

My signIn:
 const signIn = async () => {
        await authClient.signIn.email({
            email: "cool@email.com",
            password: "coolpassword",
            rememberMe: true
        }, {
            onError: (ctx) => {
                alert(ctx.error.message)
            },
            onSuccess: () => {
                console.log("loggedIn")
            }
        })
    }


console logs:
logged in 

page reloads and
convex dev throws the error:
[CONVEX H(GET /api/auth/get-session)] Client disconnected


note i have no callbackRoute set, I dont understand why its refreshing the page...
does anybody know what could cause this behaviour?
Was this page helpful?