Hi, I’m new, I’m building an app that has many companies.
I want the app to generate and assign a special (Unique) Code and PIN for each company (that cannot be duplicated on the database).
Each company can use their Code and PIN to gain access to certain features in the app and access certain (restricted ‘Privacy’) data from my database about other companies in my database.
The Code and PIN can also be used to create a special code for each employee of those many companies, that would allow the employees to engage in certain functions (between the companies) on the app.
I’m trying to dig up all I can on this, but every little suggestion would be kindly appreciated. Thank you.
Happy Bubbling! Jo
Sure, I do something like this with my point-of-sale system app. Managers and Admins can sign in with an email and password, but other employees are only assigned a PIN. Certain pages are password protected for the currently signed in manager, but other pages (like the Register or Orders pages) only require a PIN of any team member to access. There is a custom state in the header called “Current Employee” to keep track of which PIN was entered and tie any actions taken to that team member rather than the currently signed in “user” who would be the manager or admin who might not even be at the store at the time.
For employees with only a PIN, I use fake email addresses in order to create their user accounts. The fake email address is never shown to the user, it’s just a trick to work around Bubble requiring email addresses for users. Later, if for example someone gets promoted to a manager, you can edit their profile to provide a real email address and send a password reset link.
Lastly, in the privacy rules in the Bubble editor, everything is tied together with a data type called “Account” so that signed in users can only ever see data for their own company’s account.
Wow Brian, Thank you! This is great. Not sure it’s going to give me all I want to do, but it’s a great start. I’ll start with what you suggested and work from there.
You are so awesome friend for being their for me. I hope I can do the same soon someday for others.
I wish you great success and and good times.
Have a wonderful day. Jo