It is possible this is due to a deprecation warning issued a long time ago, because I can see our sample apps have always demonstrated using the latter approach (Basic authorization).
Allow me to invite you to check out the example here.
We will meanwhile check internally to find out when this change was planned. Thanks for reporting it.