Here we learn how to update the frontend to send the signed messages to the server.
A completed version of the updated frontend can be found here (03_complete_app/frontend). This example uses the browser console to print messages, so it should be actively monitored.
1. Revisit the siwe-frontend directory, stop any running servers, and update src/index.js:
<!DOCTYPEhtml><html><head> <metacharset="utf-8" /> <title>SIWE Quickstart</title></head><body> <div><buttonid='connectWalletBtn'>Connect wallet</button></div> <div><buttonid='siweBtn'>Sign-in with Ethereum</button></div> <div><buttonid='verifyBtn'>Send for verification</button></div></body></html>
3. For this last step, you need to have both the frontend and backend running together. Start by running the backend server with the following command from the parent directory:
cd siwe-backend
yarn start
In a separate terminal, start the frontend by running the following command and visit the URL printed to the console:
cd siwe-frontend
yarn start
4. Try to Sign-In with Ethereum by visiting the URL printed to the console, connecting your wallet, and signing in. You can now hit the Send for verification button to receive a true in the console.