What I’m trying to do:
Make sure my users are authenticated when they access certain routes in my app with the normal anvil login form.
What I’ve tried and what’s not working:
I could just add the login_with_form function to every form I return from the server with the route decorator, but then I wouldn’t be able to secure the data I send back from the route with the form to check that the user has access and would have to make a whole new server call once the page loads to do so, which is a lot less efficient.
I know setting authenticate_users to True would force the user to login, but with the plain html login form.