How to tell Webflow if a user is logged in to Bubble account

I have a Webflow “front” marketing site with a link which either needs to say “Log In” or “Dashboard” depending on whether the user is logged into their Bubble site.

How can I get Bubble to tell Webflow whether or not the user is logged in?

When a user logs in you can set a cookie with the unique ID of the user and the redirect back to app.

User on Webflow clicks login.
User logs into bubble. Bubble redirects to a Webflow page with the ID in the URL.
The webflow page then sets a cookie with user ID and redirect back to Bubble.

When the user returns to the Webflow site send an API request to bubble to check the login status of the user saved in the cookie. Based on the result change the button.

1 Like

Bubble can be used as a SSO provider, so the best way to do this is to use that feature.