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

    How to implement user invitation?

    Scheduled Pinned Locked Moved
    Q&A
    0
    2
    1.8k
    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.
    • E
      egis
      last edited by

      Hi,

      Since I could not find anything regarding invitation based membership I would like to know if there is an easier workaround than what I will describe here.

      The desired flow is that an existing member could invite a new user via email. A new user would set their personal information and password and becomes a member.

      1. User A creates unverified User B on FusionAuth via api with just an email.
      2. Trigger a password change email with a custom template.
      3. User B opens a link and sets a new password.
      4. User B logins to the application and updates personal information on the application and FusionAuth via API.

      Is this possible with FusionAuth or is there an easier way? Is there a chance that this https://github.com/FusionAuth/fusionauth-issues/issues/743#issuecomment-664365516 will be implemented?

      Thanks

      1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua
        last edited by joshua

        Hi @egis!

        Welcome to the FusionAuth community! Let me see if I can get you pointed in the right direction!

        API

        I would suggest reviewing our Users API which allows for a flow similar to what you are describing (if I understand you correctly).

        https://fusionauth.io/docs/v1/tech/apis/users/#create-a-user

        Request Body
        sendSetPasswordEmail [Boolean] OPTIONAL Defaults to false
        Indicates to FusionAuth to send the User an email asking them to set their password. The Email Template that is used is configured in the System Configuration setting for Set Password Email Template.
        
        If you set this value to true the password field is then ignored, FusionAuth will set the initial password to a securely generated random string.
        
        If you have also enabled email verification and do not select to skip verification using the skipVerification parameter, only the setup password email will be sent to the user. Setting up the password using the email sent during this user create operation will implicitly verify the User’s email if it is not already verified.
        
        If the SMTP email configuration is not complete, or disabled, this value is ignored.
        

        Via UI

        Once a user has been added by an admin via the UI, there is an option to send a
        toggle to “Send email to setup password." which would reproduce the functionality described above.

        Email templates

        Remember to select a template in Applications via UI
        setup-password-template.png

        Roadmap

        Is there a chance that this https://github.com/FusionAuth/fusionauth-issues/issues/743#issuecomment-664365516 will be implemented?

        While this issue is documented, it not on our short-term road map at this time.

        Please review our roadmap guidelines

        I hope this helps on your way!

        Thanks,
        Josh

        1 Reply Last reply Reply Quote 0
        • danD dan referenced this topic on
        • First post
          Last post