I don't actually think there's a good way to do this currently... Provided your site is on the same domain, you do have access to a cookie called flarum_session which can authenticate API requests... but then that doesn't help because we don't have an API endpoint to get the current user – we assume that you already know the user ID, like the default client.
Perhaps we need to implement an API endpoint to get the user whom the session belongs to (/api/user ?). Or we could add an attribute with the current user ID to the /api/forum endpoint. Any thoughts @Franz?