Detecting Bubble Logged-In User on Non-Bubble Domain

Has anyone figured out how to detect whether a Bubble user is logged in on a non-Bubble domain?

My use case is that my root domain is run on Webflow and I want to automatically redirect users who land on my homepage to my Bubble app subdomain if they are already logged-in.

Any suggestions / tips / approaches welcome!

2 Likes

I don’t think this is possible (or at least is very very difficult) because you’d need to check for the Bubble cookies that confirm the user is logged in. However recently Safari/chrome etc block cross-domain cookie reading so you wouldn’t be able to detect it in Webflow if it’s on a different domain.

Personally I’d say it’s not worth the time to figure out - I looked at this a while ago and it’s easier just to redirect them when they hit your bubble app by having a login/signup button on Webflow that takes you to the relevant Bubble page, where the redirect occurs.

Hope that helps

3 Likes

This may be a dumb approach, but what if your domain went to a Bubble webpage instead, and if the user isn’t logged in, just redirect them to the Webflow page via a “when” worfklow? The Bubble page could be the “logged in” page so if a user is logged in they stay there. Or you could create it as a blank Bubble page with the redirect workflow, which would be pretty fast to load/redirect. If someone logs out of Bubble, then there’s a redirect to Webflow, and of course Webflow would have a login button which redirects to the Bubble login page or popup.

This would work, but not sure how it impacts your SEO.

1 Like

Thanks @ed727 @help

Ed your suggestion gave me another idea. I think it may be possible to embed a Bubble iFrame within the webflow home page that would check if the user is logged-in and then re-direct the parent window to the Bubble app if so (with a bit of javascript). I’ll give it a go and let you know how I get on!

1 Like

Yes that works beautifully.

For anyone else that wants to do this.

  1. Create a new page
  2. Add the following action on page load

  1. Generate an iFrame - https://www.iframe-generator.com/ with the URL of this new page

  2. Embed the iFrame code in your non-bubble landing page

That’s great.

Separately, curious why the use of Webflow for your landing page.

@ed727 Re: Webflow - I find it much better on the design front, blistering fast page loads, optimised for SEO and built in blog functionality which are all essential for our marketing

2 Likes

Same. I’m using dorik.io for the same reason! Fast as shit initial landing page and can do good SEO. Then redirect to the login and app when appropriate

Hello,

I would love to use this method to identify the logged in user on every page of the website (is made in Wordpress) so when he launches the chat, the user gets recognized.

How can I do this?

Thanks a lot.

This topic was automatically closed after 70 days. New replies are no longer allowed.