My plan -will this work?

  • This is how I see the flow working. Am I on the right track?

    I will not be using tenants and I am hosting FusionAuth in my Docker Container. When an admin adds a user to my system, I will register that user's email address with POST /api/user/registration/{userId}. There is no notice to the user that they have been registered. At some later date the admin can send an email to the user using passwordless login by pressing a link in my UI. This will first call POST /api/passwordless/start, and then call POST /api/passwordless/send.

    My application will store the code for this user in a mySql table. When the email is received, the user can press a link in the email which will bring them to a form on my webserver. I will call POST /api/passwordless/login at this point. I will need to communicate the code (or the userId) for this user to the form page (which is php), since the code will be an index into the mysql table above and this is needed since the form will need to be customized for this user. Finally, when the user submits, the form data will be stored to the mySql table, using the code (or userId) as the index.

    Will this plan work in theory? I'd like to use the user's email address as the userId, can I do this? Also, would you suggest using tenants? Each admin on my system has their own combo of their email address plus a campaign name, and I suspect I could use this as a "tenent".

  • That seems like it will work.

    I'd suggest using the GUID of the user as the id, unless you never want to let a user change their email address.

    A major reason to use tenants is if you'd like a user to be able to register two times with the same email address and a different password. For example, if your admins or users would be unpleasantly surprised if this scenario happened:

    • they registered for site A
    • they tried to register for site B
    • the system said "you're already registered"

    If that isn't a problem, then I'd just represent each admin as an application.

  • Thanks Dan. As soon as my consultant get the API for php installed I will get right on it.

Log in to reply