/nonceto generate the nonce for the interaction via
/verifyto verify the submitted SIWE message and signature via
modulelike the following:
src/index.jswith the following:
/nonceendpoint to make sure the backend is working:
/verifyendpoint use the following, and ensure the response is
SiweMessageobject (the constructor handles this), assigning the received signature to it and calling the
message.validate(signature)in the above snippet makes sure that the given signature is correct for the message, ensuring that the Ethereum address within the message produced the matching signature.