Account Proof Flow with Signature Verification

Hey everyone,
I have a question regarding the Account Proof flow. It is described here: Proving Ownership of a Flow Account - Flow Documentation
It seems like the verification steps are as follows:

  1. Taking the CompositeSignature from the account-proof data structure
  2. Composing a Message with FCL and WalletUtils.encodeMessageForProvableAuthnVerifying
  3. Running the Cadence script or using fcl.verifyUserSignature to compare(verify) the Message with the AccountProof.signatures

A/ It seems that both AccountProof data and the Message are being sent from the frontend. Wouldn’t it be better if the backend composes the Message to verify against the AccountProof data received from the frontend?
B/ Do you have an example of the Cadence script for verifying user signatures?

Fyi. we are using the GO-SDK on the backend and React on frontend.

Thank you