Permanent "Run as (user)" feature?

Hello,

I’m building a proof of concept app with features that rely on a single user’s specific data. To demonstrate the proof of concept I’m looking for a way to make this user the permanent ‘current user’ for whoever demo’s my app.

Since it’s only a demo POC, I don’t want any login or signup pages/workflows and I’m not worried about privacy either.

I can’t seem to find how to do this - does anyone have any ideas?

Thanks!

Hi.
How are your privacy rules designed? I would make it that this user has all the rights.
Remember to do it for every single database you have.
Should help.
Remove registering flows so nobody can register any more users.

Few options, here’s what I’d do first:

Have that Page have type of data = USER

All of the user connected data on that page be fetched as Current Page's User

Have another Page called index(?)

A button on Index: Go to PageThat PageData to send : Do a search for users : first item


That should be enough. Did you try this approach?

Thanks for your response!
How do I avoid the auto-log out that bubble has in place?

Thanks for your response!

It’s only a one-page app currently and the data source is already been assigned for the page’s content, so I can’t change it to USER.

Any ideas to get around this?

Does anyone have any ideas on this?

Any advice is appreciated! Thanks

Maybe they’re a reason this hasn’t been suggested that I’m missing, but when page is loaded, Log the user in and add arbitrary text as the username and password field that are the login details for the account you want the user to be logged in as.

1 Like

Yep just have a “User is logged out” event trigger a “Log user in” action and put the static email/password you set up for the demo user. If you check “Stay logged in” you’re good for an entire year…

Thanks for the response!

That was my initial workflow idea, until I realised that I can’t create/designate a user’s password for them since I think password creation must go through bubble’s login or signup workflows? I could be wrong though…

But you have a dummy user for your app, right? Which is prefilled with some data?

Or are you saying you want any user who visits your website to have an account created just for them without having to sign up? In that case when user is logged out, sign the user up with email = arbitrary text (calculate random 12 letter string)@email.com and password = calculate random string.

“But you have a dummy user for your app, right? Which is prefilled with some data?” - Correct.

I want anyone using the app to be ‘John Doe’.

Then you have that user in your database, which means you created the user and their password. If you don’t know the password just run as from the editor and use your reset password page to reset the password of the dummy user to something that you know and can then use that password in the log the user in flow.

Ahh I think I know why I’m having the issue in the first place - I added users to my db manually, not through the bubble workflow. So that’s a no-no.
ie: no password was created to begin with.

I just quickly set up the reset password workflow for the target ‘user’ and applied a ‘Page is loaded’ workflow to ‘Log user in’ and it worked perfectly!

Thanks @georgecollier and @tylerboodman for your inputs!

2 Likes

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