How can an Admin invite Staff to his Company? [Inviting multiple users]

Actions & Logic

I am building a restaurant management app, starting with 2 user roles: Owner (Admin) and Staff.

Both of them will be connected to the same Restaurant (Company) via the unique document reference of the restaurant.

I am stuck on how the Owner can Invite the staff.

I am using Firebase

What have you tried so far?

I built a page "Invite Staff", added some fields like email and button.
I tried these actions on the button click (from the owners account):

1. Create user document, but doesnt work. Throws an error message "Flutterflow can only create user document via authentication"

  1. Tried "Create account" from authentication but it's creating weird errors and changing data on my original first signup page through which anyone can sign up (usually owners)

  2. I looked into some marketplace template apps, found nothing related to this

What's the solution? Thank you for reading!

Did you check FlutterFlow's Documentation for this topic?
Yes