Authentification of different usertypes - struggling with user collection

Eventapp- Aufbau Signup Page, Condotional Visibility, CreateAccount Action.mp4
97.7MB

Eventapp-user collection.mp4
12.05MB

Eventapp_runmode.mp4
50.86MB


Hello everyone,

I am building an app that lists events in my area. Organizers can independently submit their events, which can be viewed by visitors. So far, the login process has worked well with a user collection, where during the registration of new users, I provide a Choice Chip selection, allowing users to register as either visitors ("MEMBER") or organizers ("Creator"). Depending on the Choice Chip selection, different forms for Member or Creator registration become visible. Since users can only be authenticated through a collection, the document "Usertype" defines the user type based on the Choice Chip selection. I have had no issues with registration until now.

When I tried to switch from the Conditional Widget View of the columns in the registration forms to a Conditional Builder Widget, the following error occurred, which persists even when reverting to the Conditional Widget View:

I can only fully register one type of Member (simple email authentication + securing additional data in the User collection). As soon as I add an additional field related to creator documents to all fields of the Member documents in the "Create Account" action, no data is stored in my Firestore database anymore (see Pic1).

In the Authentication list of my Google project overview, the user is registered with email and standard documents. However, the additional documents are not being written (see the following example).


I suspect that the issue occurs during the creation of the user document. When I delete and recreate all fields in the "Create Account" action, it works for each user type individually. For example, if I enter all fields related to the user type "MEMBER," these data are stored in Firestore until I add a field related to the user type "CREATOR." Then, while users are generated in Authentication and created with standard documents (Email, uid, created time), the additional fields are no longer stored in the collection.

I hope someone can help me here or recommend a better option for registering two types of users. Thanks for any comments!

Regards, Mike

1 reply