email and password login, with unique username

Hey, is it possible to enforce unique usernames with email and password login? I want it to error if the username they chose is already taken, similar to how it works with emial.
    const response = await authClient.signUp.email({
      email: data.email,
      password: data.password,
      name: data.username,
    });


  emailAndPassword: {
    enabled: true,
  },
Was this page helpful?