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

    limiting registration

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    1
    2
    343
    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

      Is there a way to limit registration to a set of email domains or automatically assign a role to user registered with a set of email domains ?

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

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

        I'd probably use a transactional registration webhook for the first situation. This can return a non 2xx status if the domain is unacceptable and the registration won't complete.

        For the second one, you could use a populate JWT lambda to add the role to the token if the user has the correct domain. If you need it persisted you could call FusionAuth APIs within the lambda (this functionality is limited to certain paid versions) or use a registration complete webhook to augment the roles (but this won't help with the initial registration, so should be combined with the lambda if used).

        More here: https://fusionauth.io/docs/v1/tech/events-webhooks/ and https://fusionauth.io/docs/v1/tech/lambdas/

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

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