xbox
Unofficial Xbox Live authentication, gamertag/XUID resolution, and profile client for Rust.
[!IMPORTANT] This is an unofficial, community-maintained library. It is not affiliated with, endorsed by Microsoft.
What this crate does
- Signs in to Xbox Live and exchanges credentials for a Xbox Live "user token".
- Exchanges a user token for an XSTS ticket, scoped to a given
RelyingParty(e.g. Xbox Live itself, or a third-party service like Halo Waypoint). - Resolves gamertags to XUIDs (and back) via the Xbox Live people-search API.
- Caches every credential with expiry-awareness and single-flight de-duplication, so concurrent callers never trigger redundant network round trips, and callers never pay full re-authentication cost on every request.
Quick start
use LegacyPasswordProvider;
use ;
async
Feature flags
| Feature | Default | Description |
|---|---|---|
legacy-password-login |
✅ | Enables LegacyPasswordProvider, which signs in via the same username/password flow the Xbox Live web login page uses. This is not an officially documented API and may break if Microsoft changes their login page. |
A real OAuth2 device-code provider (the officially documented path, with refresh-token support) is planned as an
additive, non-breaking follow-up behind the same XblAuthProvider trait.
MSRV
This crate has a Minimum Supported Rust Version (MSRV) of 1.96.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option
Contribution
See CONTRIBUTING.md.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.