Closed BartolomeoItaliano closed 3 years ago
What you do is call either .login()
(or just identify()
if it's a pure backend/login-only application) then submit the "identity proof" to the server for validation.
const {proof} = link.login('test')
sendToServer(JSON.stringify(proof))
Look here for an example on how to verify the proofs: https://github.com/greymass/idproofer
If you're not using node.js on your server or don't want to spin up your own instance of idproofer feel free to use the one Greymass hosts over at https://eosio.greymass.com/prove
Short comment for JS inheritage:
This worked for me:
import * as superagent from "superagent";
const response = await superagent.post("https://eosio.greymass.com/prove").send(JSON.stringify({proof:anchorWalletProof}));
I am trying to authorize user who logins through Anchor Wallet on my page server, but I cannot find a way to do so.
In Scatter Wallet I used "getArbitrarySignature" method, which returns string signed with private key, I send this encrypted string to my server and there I decrypt it with public key, compare with original string and I know I am dealing with the user.
How I can achieve users server authorization in Anchor Wallet? I found in login payload "sig" property which is some encrpyted string but, I cannot find what is the original string it refers to.
Please help.