User address gone after reload the page

Hello, I am new into web3. I can successfully connect my website to metamask but after reloading the page I can’t read user address or anything. I have to logout from the console then need to connect it again. Probably it is cookies issue. I am coding into python django.

how do you try to read user address?
or how do you read it when it works?

console.log(user.get("ethAddress"));

this is the code for getting the user addres.

I think that syntax is specific to authenticated users, that have the session in cookies, maybe Moralis SDK is not initialised when the page refreshes

this shouldn’t be something related to Django, as it should work fine in vanilla js

Thanks for your reply. To make sure I just downloaded the walletconnect demo-app directory from github. It runs successfully and connected to my metamask wallet. I can check the wallet information from console just by typing

Moralis.connector;

But just after reloading the page the same code shows “null”. It might be the cookies issue. My website has several pages, in such situation I don’t want to connect my wallet again and again.

you didn’t mention walletconnect before

if you authenticate to your Moralis Server then the user session will be saved by Moralis SDK in cookies, but in order to have access to walletconnect again you may have to run something like enableWeb3 again