ejabberd is now able to support OAuth 2 password grant. You can learn more by reading: Understanding ejabberd OAuth Support & Roadmap

*****
Written on