User and end user login

I have web app where I have two users. a ‘Main User’ and an End User. the main user will use the normal create an account structure, crating there account and logging in, this will lead them to there admin area. BUT my ‘End User’ will not have to create an account to login there option of login is through Facebook or Google account only. the reason for this is so the End User’ can create a favorites list of the business who are the ‘Main Users’ and save it to view at anytime and they can receive notifications about these particular favorites they have saved only.

My Question is will this work. it seems to run fine in development mode but if I go live will it somehow glitch or am I set to face a disaster in the near future. does anybody know a better way or a way to achieve this goal??? any thought on this would be appreciated.

Hey @b.goldsworthy01 :wave:

Thanks for the post and cool idea!

Yes, this sort of account / login structure should work! One thing to keep in mind is that although you’ll be handling login separately for the two, both will be considered ‘users’ that are stored in your user database. As a result, you might consider two things:

  1. You might create an option set for user type where you can specify which user is which type. That way if you need a list of just your admins or just your end users, it’s easy to constrain the search with that value.
  2. I might have separate login pages so the two users aren’t confused about which login is for them etc.

Give it a try and don’t hesitate to reach out to us directly at Support@bubble.io with any additional questions.

1 Like

If it works fine in development, it should work in love too!

HI Andrew. Thank you for your feedback. You are dead right I found that out after posting that lol.

both users 'Main & END" have separate places within the app to login, there will be no confusion to either party to where and why they are logging in.

However your first idea I am actually trying to achieve now but have know idea how to achieve. this.
In my database I have data type: User ‘which is the main users’ and data type: End User ‘which is the end user’ .

My workflow to try and create the ‘End User’ in my database is a hit and miss and the app still refers to them as the current user. i’ll attach my workflow on the way im trying to achieve this separation of the two different users. I’m trying to create the ‘End User’ after they have logged in.


.

any ideas?

Hey @b.goldsworthy01

Ah, this is what I was referring to. Both of those user types will be stored by Bubble in the user data type. This is the built in field that handles authentication. You could certainly have that other data type linked to the user data type, but signing someone up through a social oauth plugin will store their user record in the user table of the database.

This is where it might make sense to create a user type option set. If a user signs up through facebook, you’d assign one option to them. If they sign up through your admin sign in, you’d assign a different option.

Does that help? Don’t hesitate to reach out with any additional questions to support@bubble.io

This topic was automatically closed after 70 days. New replies are no longer allowed.