Hi. The code snippet of the user object in the docs is just an example of the attributes a user has, it’s not representative of a brand new user. If the address is not known when Moralis.Web3.authenticate()
is called a new user will be created with:
- a randomly generated
username
- the
password
andemail
attributes will beundefined
In fact the user object returned is bit more complicated and looks like this:
{
className: "_User"
id: "EFurGjRPhl"
_objCount: 1
attributes: {
ACL: ParseACL {permissionsById: {…}}
accounts: ["0xda66...cb83"]
authData: {moralisEth: {…}}
createdAt: Mon Mar 22 2021 09:50:03 GMT-0700 (Pacific Daylight Time) {}
ethAddress: "0xda6...cb83"
sessionToken: "r:1fc10586d0339be71fc3cac25592693e"
updatedAt: Tue Apr 27 2021 09:43:25 GMT-0700 (Pacific Daylight Time) {}
username: "Y9jPGr0H1TcMFHUpYZPjj9xhE"
}
}