Client authorization with JavaScript

I want to create a Chrome extension that’s communicating with Nextcloud. That extension needs to authenticate with Nextcloud but there seems to be quite little documentation about it except “Login Flow”.

Is there any detailled information avaialable?