Automatic redirect for logged-in users, is it possible?

Hey,

I can’t find a better-suited category for this question so please move it if it doesn’t belong here.

We’re building a product marketing website, i.g. ABCsite.com and have 2 buttons: Log In and Sign Up. Both buttons lead to the custom-built web app at app.ABCsite.com. Is there any way to show logged-in users the app directly (even when they type ABCsite.com), skipping the Webflow site? Sort of automatic redirect for logged in users?

Thanks!

1 Like

Hey Dan,

Did you figure this out?

Hi Dan,
Checking in to see if you’ve figured this out.

Super interested if anyone found a solution to this too, thanks!

This is possible with Memberships, but it’s a strange use case.
Are you trying to do an off-site redirect right after login, and then again any time they visit your Webflow site while already logged in?

That’s odd for a few reasons, including the inability to log out, and the fact that the external site you redirect them to won’t know anything about the user or login details.

If you have more details on what you’re trying to accomplish I may be about to help.

Would love to be able to do something like this. We are a custom-built subscription SaaS web-app, using webflow for our top-of-funnel landing page. Would like to be able to route prospects to the landing for activation, then once they’ve created an account next time they visit the domain they are automatically redirected to the app.

I have seen other sites do this (seems the landing & web-app are generally one in the same, ex: Going.com)

That’s not difficult to do, just a custom redirect.
If you’re using Webflow’s User Accounts somehow, you can check for its cookies and redirect if the user is logged in, or if you’re trying to just redirect subscribed users, then you create your own cookie.

Be aware cookies expire, are cleared, and sometimes blocked so plan accordingly.

Where do add the redirect? I am looking to redirect logged in users automatically to “users only” page versus them having to navigate there themselves from the homepage. Can you help me?

https://preview.webflow.com/preview/homeboys-investment-course-page?utm_medium=preview_link&utm_source=designer&utm_content=homeboys-investment-course-page&preview=a54445d9d8a665d607a27a7643b749e8&workflow=preview

You’ll need to decide on the routing behavior you’re trying to create first.
If you’re just trying to redirect users right after a login event, you can use the built in fallback redirect setting you’ll find on the login form itself, or if the page you want to redirect to isn’t listed there, you can use SA5’s routing lib;

If you’re trying to automatically redirect your already-logged-in users who return to your site to a different site like @Uptrends and others on the thread are looking for, that’s a different setup. You’d use custom code to detect the login state and then redirect them to the site you want.

I’ve never actually had a client request that, most of the time clients want the logged in users to remain on the Webflow site, which is where the gated content would be. For auth & redirect off-site scenarios, I think I’d use a different auth solution that supports e.g. Google OAuth.

If the Webflow site is managing the authentication through User Accounts, and your app is an entirely separate, unrelated thing ( which doesn’t really need user data ), you could “combine” them the way you’re describing using a reverse proxy.

But I’m not sure what the point would be- Webflow’s User Accounts is a closed system that’s designed for gating content on the Webflow site. You wouldn’t be using those features and wouldn’t really even have the user’s identity for your app.

I’d use a different auth solution and integrate it into the app directly.