A ha! Nice one.
For anyone else the repo can be found here: https://github.com/WP-API/Basic-Auth
Same issue here. Did you find a fix?
If I add the Basic Auth plugin, and ensure that it adds it’s htaccess rules then the whole wordpress site goes behind basic auth. So visiting whilst being unauthenticated shows the dialog box.
However when I go to use the WP Rest API (v2) it seems to completely bypass the Basic Auth. So my user never gets authenticated and as a result none of the endpoints that require a user work.
I was having the same issue with basic authentication too and my issue was of two parts.
The first was that I didn’t have Basic-Auth installed (thanks robert.giaz for that).
The second was that I’m working with a multi-site install. It appears that when you make a request to the site the user you’re authenticating needs to exist for that specific site. If they exist just at a network level or in a sibling site the authentication will fail.