Skip to content

authenticate() hooks not triggering – onSuccess and onSettled not called in @account-kit/reactΒ #1760

@darshanpatel2904

Description

@darshanpatel2904

[REQUIRED] Environment

  • Browser version: Chrome 138.0.0.0 (MacOS)
  • AA SDK version: @account-kit/react@4.48.0, @account-kit/infra@4.48.0
  • Package: @account-kit/react

[REQUIRED] Describe the problem

When using the authenticate() method with email OTP, the onSuccess and onSettled callbacks never get triggered. Only onError triggers in rate-limiting cases, otherwise the SDK seems to hang with no response.

No visible console or network errors occur.

How to reproduce:

  1. Install the following packages:
{
  "@account-kit/react": "^4.43.1",
  "@account-kit/infra": "^4.43.1"
}
  1. Use this code:
import { useAuthenticate } from "@account-kit/react";

const { authenticate } = useAuthenticate();

authenticate(
  {
    type: "email",
    emailMode: "otp",
    email: "example@gmail.com"
  },
  {
    onSuccess() {
      console.log("βœ… Success callback hit");
    },
    onSettled() {
      console.log("🟑 Settled callback hit");
    },
    onError(error) {
      console.error("❌ Error callback hit", error);
    }
  }
);
  1. Observe that neither onSuccess nor onSettled gets triggered β€” even after entering the correct OTP.

Relevant code or sample repro:

See above code snippet. Let me know if you’d like a GitHub repo with full reproduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions