Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RustでOAuth2+Passkeyのライブラリを作ってます
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ktaka-ccmp
April 22, 2026
Programming
22
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RustでOAuth2+Passkeyのライブラリを作ってます
https://auth0-japan.connpass.com/event/388529/
ktaka-ccmp
April 22, 2026
More Decks by ktaka-ccmp
See All by ktaka-ccmp
Passkey_OAuth2-Osaki-rs-20250325.pdf
ktaka8ccmp
1
66
Other Decks in Programming
See All in Programming
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
170
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.3k
CSC307 Lecture 17
javiergs
PRO
0
320
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
140
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
270
Vite+ Unified Toolchain for the Web
naokihaba
0
320
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
840
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
WENDY [Excerpt]
tessaabrams
11
38k
First, design no harm
axbom
PRO
2
1.2k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The SEO identity crisis: Don't let AI make you average
varn
0
490
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Deep Space Network (abreviated)
tonyrice
0
210
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Typedesign – Prime Four
hannesfritz
42
3.1k
Transcript
RustでOAuth2+Passkeyのライブラリを作ってます 高橋 公俊 (Kimitoshi Takahashi) dev_night Tokyo #5 | 2026/04/23
1
Rustと、認証認可の修行のために oauth2-passkey というライブラリを作ってます → 今日のLTのために Auth0 / Okta 使えるようにしました ...やっと今日動きました
2
oauth2-passkeyとは OAuth2 / Passkey で認証 → Session Cookie 発行 crates.io
公開済み: oauth2-passkey{,-axum} 複数のIdP/Passkey を一ユーザーに紐付け User │ ├── oauth2_accounts │ ├── (Auth0) │ ├── (Okta) │ └── (Google) │ └── passkey_credentials ├── (1Password) ├── (Google Password) └── (YubiKey) 1. Auth0 / Okta でユーザー作成 2. Passkey を登録 3. 次回から Passkey だけでログイン デモサイト デモ動画 デモ動画 3
3 行で組み込める use oauth2_passkey_axum::{AuthUser, oauth2_passkey_full_router}; // 1. インポート #[tokio::main] async
fn main() -> Result<(), Box<dyn std::error::Error>> { dotenv().ok(); oauth2_passkey_axum::init().await?; // 2. 初期化 let app = Router::new() .route("/", get(index)) .merge(oauth2_passkey_full_router()); // 3. ルータ合流 spawn_http_server(3001, app).await?; Ok(()) } OAuth2(OIDC)/Passkey のエンドポイント、ログインUI、管理画面 が自動作成される ページ保護は AuthUser extractor または middleware で 4
対応 OAuth2 / OIDC プロバイダー Auth0 Okta Google Microsoft Entra
Keycloak Zitadel Authentik Custom (OIDC) .env を書き換えるだけ。コード変更なし OAUTH2_CUSTOM1_NAME='auth0' OAUTH2_CUSTOM1_CLIENT_ID='xxx' OAUTH2_CUSTOM1_CLIENT_SECRET='xxx' OAUTH2_CUSTOM1_ISSUER_URL='https://your-tenant.auth0.com' 5
ストレージも .env で切り替え # SQLite (開発・デモ用、セットアップ不要) GENERIC_DATA_STORE_TYPE=sqlite GENERIC_DATA_STORE_URL='sqlite:/tmp/auth.db' # PostgreSQL
/ MySQL / MariaDB GENERIC_DATA_STORE_TYPE=postgres # or mysql GENERIC_DATA_STORE_URL='postgres://user:pass@localhost/mydb' # Cache: in-memory または Redis GENERIC_CACHE_STORE_TYPE=memory # or redis コード変更不要 6
まとめ / Thank You! oauth2-passkey Rust / Axum 向け認証ライブラリ crates.io
公開済み 複数 IdP + 複数 Passkey を account linking Auth0 / Okta などのOIDC IDP 対応 高橋 公俊 フリーランス Rust 3 年目 一緒にスタートアップしませんか GitHub Contact 7