Logo-amall
discord (1)
#Authenticationhooksshowpreviousauthstate (1)
  • Hello i use nextjs packages. const onSubmit = async (data: FormData) => { const { email, password } = data const response = await signInEmailPassword(email, password) if (isError && !isLoading) { // console.log(signInError, "signInError"); setError('email', { type: 'manual', message: 'Email or Password is invalid' }) } console.log(response, 'response without success') console.log(isAuthenticated, 'isAuthenticated') console.log(isError, 'is Error') if (isSuccess) console.log(response, 'login success') console.log(error, 'signInError') if (needsEmailVerification) { setError('email', { type: 'manual', message: 'Email verification is required' }) } } When i try to login i can't see any changes. But i can see messages,errors in returned response. When i press second time i get previous auth state.

    Last active 4 months ago

    7 replies

    10 views

    EM
    EL
    +5