Can I verify and Anchor Login Signature with ecc.verify()?
If so, where do I find the data used to sign the login request?
From the Anchor documentation: “The identity returned from the process of signing in a user contains a lot of useful information about the user, including their account information, signing key, and the parameters used to sign the request itself.”
function login() {
link.login(identifier).then((result) => {
session = result.session;
let signature = String(result.proof.signature);
let publicKey = String(session.publicKey);
let data = String(**result.?**);
//Then I'll send parameters to server to run an identity check with ecc.verify
if(ecc.verify(signature, data , publicKey) === true){
//Identity is confirm on server and can return private data related to this account...
}
})
}