Post-login return URL (for redirection)

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.

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.

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?

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

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.

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

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)

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

Yes :slight_smile: that’s exactly what I meant :pray:t2: