1

I am following the Vladimir Zhuravlev "Getting Started with Waves Signer" example, I find to use Signer in my app, everything is going awesome, my problem is when after made an authorization and if the user refreshes the page it automatic logout, I want to prevent logout when refresh, it just must to do when the user clicks on logout.

User Authorisation

Waves Signer can be used to get the public data of an active user account from Waves.Exchange client.

The code:

    try {
        const userData = await waves.login();  // calling Waves Signer
        event.target.classList.add("clicked");
        event.target.innerHTML = `
            authorized as <br>
            ${userData.address}`;              // getting account address
    } catch (e) {
        console.error('login rejected')        // handling user auth reject
    }
});

1 Answers1

0

Thank you for the question. Waves Signer is designed to operate with the user private data in a safe way. The login data is stored as a variable, this is why it's not available after reloading page. Unfortunately, there is no way to prevent logout when leaving the page.