hello guys am working on a blockchain app that uses many wallets extensions like phantom , slope , solflare ... now i authorize only few public keys to be connected to my app , but the problem is if i connect with an authorized public key i can change to unauthorized one from the extension (SOLFLARE) and do what i want , please how can i detect current public key in solflare for example when using phantom here is how to access it :
window.solana.publicKey
any way to access solflare like that or any other solution i need the public key or an event that i can attach to it ...
hello guys i just figured it out , it's the same thing we can access it using :
window.solflare.publicKey
solflareLogin();
async function solflareLogin() {
window.solflare.connect();
window.solflare.on("connect", () => console.log("connected!"));
setTimeout(() => {
const wallet = window.solflare.publicKey.toString();
console.log( wallet );
}, 100);
}