#torii #oauth2 #passkeys #ecosystem #security #migration

torii-migration

Migration utilities for the torii authentication ecosystem

3 releases

Uses new Rust 2024

0.2.2 Mar 5, 2025
0.2.1 Feb 27, 2025
0.2.0 Feb 27, 2025

#1093 in Authentication

Download history 256/week @ 2025-02-24 188/week @ 2025-03-03 12/week @ 2025-03-10 5/week @ 2025-03-17

461 downloads per month
Used in 3 crates (2 directly)

MIT license

67KB
1K SLoC

Torii

CI codecov docs.rs Crates.io Version

[!WARNING] This project is in early development and is not production-ready. The API is subject to change without notice.

Overview

Torii is a powerful authentication framework for Rust applications that gives you complete control over your users' data. Unlike hosted solutions like Auth0, Clerk, or WorkOS that store user information in their cloud, Torii lets you own and manage your authentication stack while providing modern auth features through a flexible plugin system.

With Torii, you get the best of both worlds - powerful authentication capabilities like passwordless login, social OAuth, and passkeys, combined with full data sovereignty and the ability to store user data wherever you choose.

Checkout the example todos to see Torii in action.

Features

Plugin SQLite PostgreSQL MySQL (using SeaORM)
Password
OAuth2/OIDC
Passkey
Magic Link

✅ = Supported 🚧 = Planned/In Development ❌ = Not Supported

Security

[!IMPORTANT] As this project is in early development, it has not undergone security audits and should not be used in production environments. The maintainers are not responsible for any security issues that may arise from using this software.

Contributing

As this project is in its early stages, we welcome discussions and feedback, but please note that major changes may occur.

License

This project is licensed under the MIT License - see the LICENSE file for details.


lib.rs:

Migration management for SQL databases in Torii

This module provides traits and utilities for managing SQL database migrations in Torii. It defines a common interface for writing migrations that can be used across different SQL database backends.

The main traits are:

  • Migration: Defines a single SQL migration with up/down operations
  • MigrationManager: Manages the execution and tracking of migrations

Migrations are tracked in a database table (default name: _torii_migrations) to record which migrations have been applied and when.

Dependencies

~39–52MB
~1M SLoC