PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 11:16 PM

Is there a way to programmatically get the window.location.href?

  • Tom Ireland

    19 days ago

    If I navigate to https://my.toddle.site/subscribers and I'm not logged in, I get redirected to the login page to submit my email address and then verify my OTP (expected).

    I'd like to be able to redirect the user back to /subscribers if login is successful. This would be the same for other pages a user might visit.

    Is it possible to grab the URL dynamically to set up a redirect and pass that along with the login flow?

    My guess is query params in some way shape or form?
  • Lucas G

    19 days ago

    What I do is on the redirect action I add a URL parameter
  • ?redirect=currentURL
  • Which also works server side
  • This was something @Kedde implemented for me when we were testing v2 😁
  • You just redirect to the parameter on login success
  • Tom Ireland

    19 days ago

    Nice. I’ll give that a wee go.

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.