Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
RustでOAuth2+Passkeyのライブラリを作ってます
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ktaka-ccmp
April 22, 2026
Programming
38
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
81
Other Decks in Programming
See All in Programming
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
450
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
120
APNsからLive Activityを開始する話
yumnumm
0
150
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
1
730
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
230
AIに “答え“を書かせるのを やめてみた
___akari11
0
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
Kubernetes祭り #2 OP/ED
bells17
0
100
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
Jetpack Compose Mechanisms
skydoves
2
520
phperだってパンチカードでコーディングしたい
o0h
PRO
0
220
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The SEO identity crisis: Don't let AI make you average
varn
0
580
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
How to Ace a Technical Interview
jacobian
280
24k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
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