Why is the user Object in post registration hook have no username in it

I am trying to add user id and username into database upon user post registration.
If I do console.log(user) I am getting the following result.

{
tenant: 'wallora-test',
email: 'dbjudwdujw@gmail.com',
emailVerified: false,
id: '61542dc66ae3cb0068f5670b'
}

There seems to be no username and some other properties as shown comments of the editor

Here’s what I wrote into the editor

/**
@param {object} user - The user being created
@param {string} user.id - user id
@param {string} user.tenant - Auth0 tenant name
@param {string} user.username - user name
@param {string} user.email - email
@param {boolean} user.emailVerified - is e-mail verified?
@param {string} user.phoneNumber - phone number
@param {boolean} user.phoneNumberVerified - is phone number verified?
@param {object} user.user_metadata - user metadata
@param {object} user.app_metadata - application metadata
@param {object} context - Auth0 connection and other context info
@param {string} context.requestLanguage - language of the client agent
@param {object} context.connection - information about the Auth0 connection
@param {object} context.connection.id - connection id
@param {object} context.connection.name - connection name
@param {object} context.connection.tenant - connection tenant
@param {object} context.webtask - webtask context
@param {function} cb - function (error, response)
*/
module.exports = async function (user, context, cb) {
 const fetch = require("node-fetch");

console.log(user)
 await fetch(`https://************`, {
    method: "POST",
    headers: {"Content-Type": "application/json" },
    body: JSON.stringify(***********)
  });
  cb();
};

Note the query works fine , when I have added hard coded string values for id and name field in the body (hidden here).

Can I get some help from Team auth0 @konrad.sopala ?

Hey there!

As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!