# Post-login return URL (for redirection)

**URL:** <https://community.weweb.io/t/post-login-return-url-for-redirection/15213>\
**Category:** How do I?\
**Tags:** authentication\
**Created:** [January 3, 2025, 4:45pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213 "2025-01-03T16:45:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 3, 2025, 4:45pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/1 "2025-01-03T16:45:32Z")

</div>

How can I set a return URL/page for post-login redirect?

Use case: user is linked to a specific page but is unauthed, so they get automatically redirected to the login page. Post-login, I want them to be redirected to the original page they tried to reach, not my default home page.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 3, 2025, 5:48pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/2 "2025-01-03T17:48:55Z")

</div>

There usually is a clue in the query string of the url, so it’s `yoururl.com/login?{detail_here}` you can infer the previous page from that. Or you could handle this yourself without relying on WeWeb via a on page load workflow and append the query yourself.

---

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 3, 2025, 6:15pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/3 "2025-01-03T18:15:27Z")

</div>

Thanks for the reply. But I use the Xano auth plugin so the unathed redirect is defined at the plugin level. Can I override that with a page level workflow redirect?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 3, 2025, 6:23pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/4 "2025-01-03T18:23:56Z")

</div>

You could pass it into the API maybe as a query param. I’m not that familiar with Xano unfortunately.

---

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 3, 2025, 6:27pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/5 "2025-01-03T18:27:43Z")

</div>

Yep I hear you - and I think you’re exactly right if I were handling the auth outside of the WeWeb plugin.

But with the (Xano Auth) plugin (that I don’t want to rip out if I don’t have to), I don’t really seem to have much configurability best I can tell.

 ![Screenshot 2025-01-03 at 11.25.33 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6447efc81dd619b0949ef900cbfeb5f21e1c9512.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 3, 2025, 6:42pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/6 "2025-01-03T18:42:08Z")

</div>

I think you should still have it automaticallyin the url on the login page btw

---

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 3, 2025, 7:21pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/7 "2025-01-03T19:21:16Z")

</div>

Where are you suggesting I should implement the query param logic?

With the Xano auth plugin, the redirect to the Login page happens automatically without any of my own workflow logic (which is a bit of my problem as far as I understand)

---

<div class="post-metadata">

**Author:** ![clncsports](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@clncsports](https://community.weweb.io/u/clncsports)\
**Post date:** [January 3, 2025, 7:32pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/8 "2025-01-03T19:32:49Z")

</div>

Oh wow I see what you’re saying…looks like the plugin is handling adding the query param for me! Thanks @Broberto

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 3, 2025, 7:46pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/9 "2025-01-03T19:46:14Z")

</div>

Yes 🙂 that’s exactly what I meant 🙏🏻

---

<div class="post-metadata">

**Author:** ![kjsdh23](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@kjsdh23](https://community.weweb.io/u/kjsdh23)\
**Post date:** [July 13, 2026, 2:55pm UTC](https://community.weweb.io/t/post-login-return-url-for-redirection/15213/10 "2026-07-13T14:55:51Z")

</div>

Your thread has been helpful so far, thanks 🙂 I am just not live yet with the app so I believe I cannot see the query that the plugin automatically appends to the url on the Login page, right?

Could you maybe tell me what the query name is? Is it “origin”? So I can already build the login now. Thank you!
