Social login Account creation with additional field

How to pass additional state during a social provider sign-in (e.g., Google). When a new user signs up with say for example Google, I want to store an extra field in the database, like { "a": "123" }, alongside the default user data. How can I pass this custom data from the client and handle it on the server to save it in the DB?
  const signIn = async () => {
    await auth.signIn.social({
      provider: "google",
      loginHint: "EXPERT",
    }, {
      query: {
        userType: "EXPERT"
      },
    });

  }
Was this page helpful?