| Crates.io | rbx_auth |
| lib.rs | rbx_auth |
| version | 0.3.0 |
| created_at | 2022-06-18 21:50:09.34877+00 |
| updated_at | 2025-03-04 04:03:59.788731+00 |
| description | Constructs params for making authenticated requests to Roblox APIs |
| homepage | https://github.com/blake-mealey/mantle/tree/main/rbx_auth |
| repository | https://github.com/blake-mealey/mantle |
| max_upload_size | |
| id | 608703 |
| size | 60,435 |
rbx_authHelpers for working with legacy Roblox authentication (.ROBLOSECURITY cookies and X-Csrf-Token headers).
Best used with the rbx_api crate. Available as both a library and CLI.
Install with cargo install rbx_auth.
rbx_auth --help
Disable default features to exclude the CLI dependencies with cargo add rbx_auth --no-default-features, or
use the default-features = false configuration:
# Cargo.toml
[dependencies]
rbx_auth = { version = "<version>", default-features = false }
use rbx_auth::{RobloxCookieStore, RobloxCsrfTokenStore};
let cookie_store = Arc::new(RobloxCookieStore::new()?);
let csrf_token_store = RobloxCsrfTokenStore::new();
let client = reqwest::Client::builder()
.user_agent("Roblox/WinInet")
.cookie_provider(cookie_store)
.build()?;
let res = csrf_token_store
.send_request(|| async {
Ok(client.get("https://users.roblox.com/v1/users/authenticated"))
})
.await?;