The cesium crate provides a simple interface for authenticating with fediverse servers using the OAuth API.
cesium
For more info, see https://docs.joinmastodon.org/spec/oauth/