# Magic Link expiration more than 24 hours

**URL:** <https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989>\
**Category:** Need help\
**Created:** [September 3, 2024, 3:44pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989 "2024-09-03T15:44:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelinebbg](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@angelinebbg](https://forum.bubble.io/u/angelinebbg)\
**Post date:** [September 3, 2024, 3:44pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/1 "2024-09-03T15:44:34Z")

</div>

Hello everyone,

I would like to send a Magic link but with a link expiration more than 24 hours.

I found this method :

> [@Magic link with \>24 hour expiration?](https://forum.bubble.io/t/magic-link-with-24-hour-expiration/256704):
>
> In my app sends invitations to users that should log them in and offer them a gift. I’m using magic links for these to make the process as smooth as possible for the recipients, but in my use case it’s likely that the user might wait a day or two to visit the link. Is there any way to get around the 24 hour expiration limitation in bubble? I considered trying to roll this myself using unique ids of the invitation records as the key to get in, but I couldn’t figure out how to make that work wi…

But I did not get it, it does not work on my side.

Some of you have achieved to make a magic link more than 24 hours ?  
If yes, how did you do it ? Could you explain me the process?

OR, do you know another method to allow the user to go directly inside his/her account when he clicks on the link received by email?

Thank you so much

---

<div class="post-metadata">

**Author:** ![eliot1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/eliot1/32/215285_2.png) [@eliot1](https://forum.bubble.io/u/eliot1)\
**Post date:** [September 3, 2024, 4:07pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/2 "2024-09-03T16:07:14Z")

</div>

Hi I did something like this on one of my project. But it’s kind of a security breach for your app that can be hacked by brute force.

We did as follow:

1. Create a page with a workflow on load that trigger an API connector / backend workflow to regenerate a magic link based on a user unique id in the URL parameters
2. This workflow was a backend workflow we used in the API connector so we can get the response (the magic link URL)
3. Then we just wait X sec then redirect to the response URL
4. Bubble did the rest. And the user was connected

But I highly recommend to not use this kind of technique. Because like I said in the beginning, there is some kind of security breach there.

---

<div class="post-metadata">

**Author:** ![angelinebbg](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@angelinebbg](https://forum.bubble.io/u/angelinebbg)\
**Post date:** [September 3, 2024, 4:27pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/3 "2024-09-03T16:27:30Z")

</div>

Hello,

Did you do the same process that @yusaney1 proposes on the post below ?  
[Magic link with \>24 hour expiration? - #11 by Steve\_W](https://forum.bubble.io/t/magic-link-with-24-hour-expiration/256704/11)

Because on my side, it did not work.

I will ask for the security breach with my partner,

thank you.

---

<div class="post-metadata">

**Author:** ![eliot1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/eliot1/32/215285_2.png) [@eliot1](https://forum.bubble.io/u/eliot1)\
**Post date:** [September 3, 2024, 4:39pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/4 "2024-09-03T16:39:53Z")

</div>

Yes kinda.  
But I remember struggling on 2 stupid things

- about the url of the POST call in the API connector. Check that your URL is not the version-test one.
- And when redirecting I did a find and replace to the link because I obtained a [domain].bubbleapps.io link when I needed a [subdomain].[domain].com link

---

<div class="post-metadata">

**Author:** ![angelinebbg](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@angelinebbg](https://forum.bubble.io/u/angelinebbg)\
**Post date:** [September 3, 2024, 4:45pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/5 "2024-09-03T16:45:28Z")

</div>

Thank you so much 🙂

I am kind of afraid about Hacking so maybe we will forget it.

I have a question :  
Do you think it is possible to send an email (Via Sendgrid) to the User,  
He.she clicks on a link to go on the app and we ask him to fill out :

- identification
- Password

To connect on his/her account.

**BUT** :  
Is it possible to fill the identification with th email directly ? So the User writes onlyt the password ?

Thank you

---

<div class="post-metadata">

**Author:** ![eliot1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/eliot1/32/215285_2.png) [@eliot1](https://forum.bubble.io/u/eliot1)\
**Post date:** [September 3, 2024, 4:56pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/6 "2024-09-03T16:56:42Z")

</div>

Yes absolutely possible if you pass a parameter in the link of your email to find the the right user’s email/id.  
2 + 1 options:

- have bubble users unique id available in sendgrid to customize dinamically the link with it and then in the bubble landing page search Users where unique id = URL parameter’sid:first item email to populate the identification input
- same technique but pass directly the email as parameter. But it’s a little bit less secure than the first option. Because someone can try to find your user’s email by testing different value in this parameter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [November 12, 2024, 3:45pm UTC](https://forum.bubble.io/t/magic-link-expiration-more-than-24-hours/337989/7 "2024-11-12T15:45:25Z")

</div>

Closed on November 12, 2024, 3:45pm UTC

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