Override user register default URL to set up password in order to create a sign in/sign up workflow on a decoupled Drupal(React on front).
I've used the core provided rest resource /user/register with Rest ui, and after giving the permission Access POST on User registration resource to anonymous users , i was able to register users via the resouce /user/register?_format=hal_json without any authentication

I wonder if there is a way to override the link that is by default sent to the newly users via mail to setup his password ?

I don't want the users to setup their passwords on a Drupal page with a Drupal form.
I think no need to override the default register url.   


To prevent Anonymous from register users, Just go Administration >> Configuration  People http://example.com/admin/config/people/accounts.
and check Administrators only in REGISTRATION AND CANCELLATION fieldset like the following:



If you have another raison to change the default url follow this tutorial just change route name from user.login to user.register.