Finished OneDrive login. Spent too much time figuring authentication.
Despite re-reading the docs several times I failed to implement auth fully in the browser. CORS on Microsoft’s /token endpoint defeated me. The docs imply it should work but I don’t know if it fails because I didn’t configure something properly or because it’s not possible.
No big deal, just like with Google Drive, I fixed it by routing some requests via backend, which fixes CORS issues.
Added readDir function. Was easy but MS Graph is yet another API to learn. I could use Microsoft’s client library, but it’s probably less documented than HTTP endpoints, so I’ll write my own wrappers around HTTP calls.