Hi all,
I set up dbAuth from generator commands yesterday. I can successfully create an account, but can’t log in, as the value of isAuthenticated isn’t being updated when the signUp
command succeeds (I think it succeeds because it raises the success toast) but the value of isAuthenticated doesn’t update. Leads to lots of weird behavior but the root is that isAuthenticated remains false (have checked with logging at various points).
E.g. (generated) function below where the value for isAuthenticated doesn’t update.
const onSubmit = async (data: Record<string, string>) => {
const response = await signUp({
username: data.emailAddress,
password: data.password,
})
console.log('response: %o', response)
if (response.message) {
toast(response.message)
} else if (response.error) {
toast.error(response.error)
} else {
// user is signed in automatically
toast.success('Welcome!')
setIsAuthenticatedState(true)
}
}