[SOLVED] Moralis.getAccounts() doesnt work

I am trying to get user accounts by usung Moralis.getAccounts() function but it doesn’t seem to work.

What is the correct way of getting the user address in the frontend?

My use case is that I am sending this address to a server that I control and from that server I am calling a cloud function with master key and passing the user’s address.

There are various ways to get that info
one possible way:

x = await Moralis.User.current()
x.attributes['ethAddress']
or
x.attributes['accounts']
1 Like

Thanks,

yep, after user is authenticated I just used
user.get("ethAddress")