Unable to Access Generated Magic Link Using "Send Magic Login Link"

Hi everyone.

I am encountering an issue with the “Send Magic Login Link” action. My goal is to generate a magic login link without sending it via email, so I can use the link in a custom workflow. Specifically, I want to display the link in a button or redirect the user to the link after they confirm an SMS token.

Here’s what I’ve tried so far:

  1. I checked the “Just create link, don’t send email” option in the “Send Magic Login Link” action. However, I cannot access the magic link in subsequent steps of the workflow. The expected result (Result of Step X’s link) does not appear in the available fields.
  2. I tested this setup in a standard workflow and also through a backend workflow. Neither approach allowed me to retrieve the generated magic link.
  3. I also verified the setup using the debugger, but the link does not appear as an output in the workflow logs.

My process is as follows:

  • First, I use “Send Magic Login Link” with the appropriate email and settings.
  • After this, I try to pass the link to a custom state or open it via an “Open external website” action, but the generated link is unavailable.

This issue is blocking my ability to complete a feature where users can log in via magic links. Could you help me understand why the magic link is not accessible, and what steps I might be missing?

Thank you for your assistance!

Hi Renan,

I will be honest I haven’t used this feature before. Is the email you are using for a current user that is signed up to your bubble database?

I just read this in the docs. Could be the issue your facing? Account | Bubble Docs

Jonathan is correct. The expectation with Magic links is that you email them to the user they were created for. From a security standpoint, it means you cannot “view” the link.

Attempting to use it in a custom state or as a readable text is a security risk.

Hi @jonathan.baxter1991 and @JDeltree , thank you for the reply.

Bubble is indeed not allowing me to access the magic link, even though the option to “only create the link and not send the email” is available and checked.

What I wanted to do was verify the user’s identity through a TOKEN via SMS and then log them in using the magic link.

Since this approach didn’t work, I found an alternative and I am now able to log the user in a different way.

I appreciate your help in clarifying that I wouldn’t be able to access the link.

3 Likes

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