Add an extra call from our API upon registration, login, logout, forgot password

how to add an extra call to our API upon registration,login,logout,forgot password without using SSO

example: for registration upon saving in registration in Discourse it will trigger a post request to our API and save it to our database. and the login in discourse will get request to our API to check for the users same with logout and forgot password.

Hope you can help us, Thanks!