Having a bit of a road block in my development process. I want to create an application where a user signs in through metamask, and has their owned NFTs displayed.
In the MetaMask api, I found this https://docs.metamask.io/guide/getting-started.html#connecting-to-metamask
const ethereumButton = document.querySelector('.enableEthereumButton');
const showAccount = document.querySelector('.showAccount');
ethereumButton.addEventListener('click', () => {
getAccount();
});
async function getAccount() {
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
const account = accounts[0];
showAccount.innerHTML = account;
}
This works great, and I am able to receive the accounts[0] with Javascript, to see the wallet address of the user.
The main issue I am having is how to verify the user owns the wallet. Am I missing a big step in the process?