tutorials with jason

Cool Cat Productions

This web app runs entirely within Webflow and integrates with Firebase UI for authentication

Site wide code

If you're looking at a read only Webflow version of this site, you won't be able to see this through Webflow. Follow the instructions below.

Check out the site wide head code

If you're reading this from your browser, inspect this page and look at the custom scripts just before the closing </head> tag. You should see 3x <script>...</script>. These 3 scripts are placed here to be made available site wide.

  • The 1st script initialises the connection to Firebase
  • The 2nd script alerts a user if they log in and have not verified their email address
  • The 3rd script provides functions to pop success or error notifications to the user

Check out the site wide footer code

Inspect this page and look at the custom scripts just before the closing </body> tag. You should see 2x <script>...</script>. These 2 scripts are placed here to be made available site wide, but it is not necessary for them to be in the head code.

  • The 1st script shows and hides buttons depending on whether or not a user is authenticated
  • The 2nd script provides a log out function for when the log out button is clicked

Page specific code

You can see this by looking at the Custom Code section of each page in the Webflow designer.

Check out the Profile page code

This page contains the most code anywhere on this example site. The functionality can be boiled down to:

  • Redirecting the user to the Log in / Sign up page if they try to access the Profile page without being authenticated.
  • Getting the user's email address, profile pic, name, phone number and bio and passing these values to be displayed on the Profile page.
  • Allowing the user to update all of their profile information and have it displayed back to them once updated

Check out the Log In / Sign up page code

This page contains some simple head code which sets up the FirebaseUI authentication widget and displays it in the Log In / Sign Up page.