Using the base example provided, there´s the following situation: once the user has authenticated once, on subsequent runs the user will be already authenticated (unless the session has expired or user has manually logged off, I suppose) but the web browser pop up will still show, asking to login again, which will trigger onLogin once more.
How do I detect that the user is already authenticated so I can prevent the pop up from showing again?
Looking for something like this:
void Start()
{
web3Auth = GetComponent<Web3Auth>();
web3Auth.setOptions(new Web3AuthOptions()
{
redirectUrl = new Uri(""),
clientId = "",
network = Web3Auth.Network.TESTNET,
});
web3Auth.onLogin += onLogin;
web3Auth.onLogout += onLogout;
////////////
if(!web3Auth.loggedin)
login();
///////////
}
Thanks.