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
ktaka-ccmp
April 22, 2026
Programming
35
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
80
Other Decks in Programming
See All in Programming
wkhtmltopdfの次どうするか問題2026
willnet
1
850
Are APIs Still Relevant in the AI Era?
soyuka
0
230
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.2k
Jetpack Compose メカニズム
skydoves
0
430
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
330
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.3k
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
310
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
720
Webの地図
yosuke_furukawa
PRO
6
4.5k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
480
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
330
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Designing Powerful Visuals for Engaging Learning
tmiket
1
550
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
How GitHub (no longer) Works
holman
316
150k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
Become a Pro
speakerdeck
PRO
31
6.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
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