Pls how do i display attributes into my html end

i want to display attribute like ethaddress, username and co into my html frontend but noting shows up after login

<div class="col-md-6 d-flex align-items-center">

              <h6 class="mb-0">USER INFO</h6>

              <h6  id="add"class="mb-0"></h6>



info = async() => {


    const address = Moralis.User.current();


    document.getElementById("add").innerHTML = address;



you could write there:

    const user = Moralis.User.current();


it looks like you are not logged in from the error that I see in your browser console, you could try to login again
you could also try to update your Moralis server in case that it isn’t the latest version

this is the login page where i initialize the login

this is the admin page where i wanna display does attributes

and my server is upto date
i just update that in an hour ago


Screenshot 2021-10-22 202031

for username, after you have the user, you can use:


for ethAddress:


on what line you get these errors?
can you put some console.log lines between lines so that you know were from there errors are coming?
first error looks unrelated to the code that you pasted, I don’t see any feather

you mean like this?

info = async() => {


    const user = Moralis.User.current();



    // console.log(JSON.strinfigify(user));

    document.getElementById("add").innerHTML = address;

and what does this error means from the dashboard
Screenshot 2021-10-22 203146

that error means that you didn’t sign the message at login when metamask appeared.

and if thats the case that the dashboard is not connected, and is already logged in from the signinpage
now base on my opservation i think the reason that might cause that is that the URL from the signin page is diff from the dashboard and metamask connected with the signin URL so how do i solve that error at first?

I don’t think that it is a problem of changing pages, that error says that you didn’t login because you didn’t sign the message in metamask.

i reload a sign but still the same

Pls how do i display attributes into my html end here it looks like you had a successful login

yes i can login successfully buttttt
now to display attribute to dasboard frontend is my issue nw
and thats what i need solution to

where/when do you run this info function that should get the info? it shouldn’t work how it is now, but at least it should write something in the browser console

i run the info function from the dashboard whenever user is signed in from the signin page it should display address

what is the code that does that? it is that function executed?

i think is working now Thanks

and more thing, how do i rap the code below into a function cus i do its wont work again but if i leave it just like the code below it will work… but will affect my login authentication
so how do i go about the it

you can put all that code in a function and call in the place where you wrote the code now.

async function get_user_info() {
   user = await Moralis.User.current();