Invite users to an organisation through management api

I am using auth0 nodejs SDK to create organizations and invite users through the management API. The invited user receives the invitation email, but once he clicks on it, it asks him to enter a password instead of setting the password himself. Please is there a way I can get the user to set his password once he clicks on the link?
NB: The invitee email I’m using is not registered on Auth0, I want them to register after following the invite link.

I was able to fix this. I realized i was not passing on the inviting and organisation query parameters to the /authorize endpoint