Sequencing Geolocation and Authentication in Webflow

In this meeting, the State Changers discussed an issue with saving location data in session storage. They noticed that the location data was not being saved when the user clicked the login button and transitioned to a new page. They realized that this was due to the race condition between the geolocation code and the page navigation code. The State Changers discussed the difference between Webflow and single page applications, explaining that Webflow navigates to new pages while single page applications keep the same JavaScript runtime. They concluded that in order to solve the issue, they need to sequence the geolocation code before the navigation code. They discussed the option of disabling the login button until the geolocation code finishes, or having the geolocation code initiate the authentication process. They agreed on implementing the latter solution by rewriting the code accordingly.

(Source: Office Hours 2/27 )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free