Sign up users "internally"

Options
Momuu
Momuu Member
edited October 2023 in ? Help! I'm a Noob

Hello everyone,

I am making an app for a client. I want to be able to create a Superadmin to signup Administrators of the organization. This administrators created by the Superadmin will be able to signup members of the team. But the idea is that Signup page is not a public page, so nobody outside of this organization can signup in the app.

I am creating different signup forms for these different levels but I am not sure if I am going in the right direction. If you could help me with a correct approach it would be very useful.

Many thanks

Tagged:

Answers

  • Max
    Max Member
    Options

    hi, in such a scenario you could may be remove sign-up altogether and use create\invite routines for adding users.

    you could add tables like "tenants" and "usergroups" for example, and manage multitenancy in CRUD, that is somewhat similar to an app im currently working on, and im doing sort of RBAC+multitenant in similar way, so based on tenant_id for example superadmin from that tenant could have say UI with "create" or "invite" user to their organization, by e-mail, and that step in CRUD could automatiucally create that user in system, and send them information on how to log-on, or magic-link, or whatever auth you use.

  • Momuu
    Momuu Member
    Options

    Many thanks Max. I really appreciate it. So if I remove signup process how could I get auth tokens for each user?

  • Max
    Max Member
    edited October 2023
    Options

    they will log in, and after you utilize /auth/me. I also think during log on we are retrieving token as well. I was speaking about sign-up process and user creation. after users are created in whatever way you then of course give them a way to log in, at least one, password, magic-link, etc.

    P.S. also how you will execute function stack when your "superuser" invites\creates user - are all up to you, you can generate and do anything on backend side, user only get and see end results.

  • Momuu
    Momuu Member
    Options

    Many thanks for your help! I will make some test following this set up