Just a note here that I (with some help from the friendly Auth0 team) ended up tweaking the example query to generate valid PHC strings for importing user passwords into Auth0.
I also encoded the salt as base64 by changing this line
salt,
to
replace(encode(users.salt::bytea, 'base64'), '=', ''),
See further here (including a step by step on how to import Discourse users and their passwords into Auth0).