User Data Type?

Okay guys, i have decided to take a break from our app and have started on an internal app.

i have 4 questions.

Before an employee can log into the app, they need to provide an access code, their employee id and their password (possibly a temp password) and then they can set their own password after their own password and gain access once the code has been verified. Once the employee uses the code for the first time i want to remove the “access code” input but keep the code stored in the database.

1, Would i need to create the fields for the access code, password, and employee id in the “user” data type or would i need to create a new data type?

  1. how would i verify that the access code is valid, and the employee id exists so that the employee can access the platform? (an idea of workflows to get me started would be helpful please.)

  2. is there any way to connect 2 bubble apps other than using a sub app? if possible.

  3. how would i assign the employee a temp password for all of this to work?

any help is appreciated, I am new but i am learning everyday

  1. You definitely need an access code in the database. For ID, you can use the User’s unique ID (or add another field and make it custom). The password field already exists, DO NOT create a field for the password. Bubble will never show you, the developer, user’s password.
  2. Create a workflow that checks if the provided input access code matches the one in the database. Preferably a backend workflow.
  3. Yes, you can use the API. Refer to The Bubble API | Bubble Docs for guidance.
  4. There’s an action for assigning a temporary password to a user. See Account | Bubble Docs for details.

thank you so much, ill try it and check it out