FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    External validation of users on registration

    Scheduled Pinned Locked Moved
    Q&A
    external registration validation
    0
    2
    2.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by joshua

      Can we do an external validation when a user registers in FusionAuth?

      For example, if user@example.com wants to register, can we first check with an endpoint in our API if this email is being used?

      Is there is a way that we can use this endpoint to block that registration?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        You can use the user.create or the user.registration.create webhook to do something like this.

        If you enable these webhooks and configure the transaction to require the webhook to succeed, then you simply need to return a non-200 status code from the webhook to cause FusionAuth to fail this create.

        https://fusionauth.io/docs/v1/tech/events-webhooks/#tenant-settings
        https://fusionauth.io/docs/v1/tech/events-webhooks/events/#user-create
        https://fusionauth.io/docs/v1/tech/events-webhooks/events/#user-registration-create

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post