7 releases

new 0.3.0 Mar 4, 2025
0.2.3-prerelease Oct 14, 2024
0.2.2 Oct 29, 2023
0.2.1 Aug 6, 2023
0.1.0 Jun 18, 2022

#777 in Games

Download history 9/week @ 2024-12-08 119/week @ 2025-03-02

119 downloads per month
Used in rbx_api

MIT license

35KB
568 lines

rbx_auth

Helpers 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.

CLI

Install with cargo install rbx_auth.

rbx_auth --help

Library

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?;

Dependencies

~8–21MB
~302K SLoC