Menu

Sanctum for Laravel Rust: API tokens and SPA auth, rebuilt natively in Rust
📰

Sanctum for Laravel Rust: API tokens and SPA auth, rebuilt natively in Rust

DEV Community: laravel·Saad Majeed·about 9 hours ago
#XMQh7R6F
#devtolaravel#devto#dev#token#user
Long article (2731 words) — no AI summary yet.
Reading 0:00
15s threshold

Laravel Sanctum is the standard way to authenticate API tokens and first-party single-page apps in Laravel PHP. It has two modes: personal access tokens for API clients, and cookie-based auth for a first-party SPA.

Laravel Rust 0.1.4, the Rust port by Taylor Otwell, has session auth and a RequestGuard pattern, but no personal-access-token model and no SPA mode. rupirate-sanctum fills that gap. It is a native Rust crate, written from scratch, that brings both Sanctum modes to Laravel Rust.

It is part of rupirate , a set of Laravel packages rebuilt natively in Rust. Version 0.2.0 is on crates.io .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.