Blockstack.js gives users full control of their application data in fewer than 10 lines of code
Last week we put together a basic component that allowed our users to log in with Blockstack and see their profile. Since then, I’ve made some significant changes to incorporate Redux, Redux-saga, and React Router. Most of these changes are merely structural, but one change does alter functionality. We’ll look at that change below.
Before we get into adding persistence to our snippets application, let’s review my change to the log-in flow and introduce the basic snippet functionality I’ve added since last week.
Routing with React Router
I added React Router to help manage the application and adjusted some functionality to handle a new log-in from a separate route. Now, after we click the log-in button and we are redirected to the Blockstack Browser for authentication, Blockstack sends us back to a /callback endpoint. This type of hand-off to a dedicated endpoint is relatively common with OAuth workflows, so you may be familiar with it already.