You can use the User Service plugin to create users on the Openfire server, but this won't be secure as the client requires the plugin secret to do this.
It would be better for your app to use a separate authentication server; one of its functions would be to create users on the Openfire server via this plugin.