Forum Academy Marketplace Showcase Pricing Features

Log in user via link in email?

Hello,

Hoping someone can help me understand the “Log in a user…” workflow.

The app I’m building has a messaging function that can trigger an email to the recipient. I’d like to have a “reply” link (or similar) that includes the recipients user ID as a parameter.

Ideally, when that user clicks the link, the app:

checks for an existing login → if there is none, makes sure the user ID is valid and automatically passes the email and password corresponding to that user ID, logging them in.

The issue is that I’m unable to pull the target user’s password in the “Log in a user…” workflow function. I’ve read that a potential workaround might be to store the users password as text in my database, but I’m not thrilled with that option at all.

Anyone encountered this before?

Thanks!

1 Like

Hello @jmbehrens welcome to the community!

Challenging use case you are facing.

The app should log in a user with no password. Bubble does not work that way.

Suggested alternatives:

  1. Invite the user to log in
  2. Allow functionality for that page for logged out users … BUT whose url user ID exists in the database

@jmbehrens

  1. I agree … a user password should not be housed in the database that evidently. It can be exposed to users that have access to your editor, you could be sending it inadvertently to the browser (… you could restrict this using privacy rules).

Option 3 is just not good practice.

Thanks for your help!

I ended up doing a version of your second suggestion (essentially, pop up a modal with their email address pre-filled).

It would be nice to be able to create a workflow that reads a URL and says “if id=[user id] is valid, skip password requirement and log in the user”

Bummer

@jmbehrens

That would be the day… when platforms do not have to worry about security :grimacing: