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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ktaka-ccmp
April 22, 2026
Programming
25
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
70
Other Decks in Programming
See All in Programming
初めてのKubernetes 本番運用でハマった話
oku053
0
120
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
610
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
100
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
840
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.9k
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
フィードバックで育てるAI開発
kotaminato
1
110
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
Vite+ Unified Toolchain for the Web
naokihaba
0
740
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
110
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
130
symfony/aiとlaravel/boost
77web
0
120
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
30 Presentation Tips
portentint
PRO
1
350
A better future with KSS
kneath
240
18k
Skip the Path - Find Your Career Trail
mkilby
1
160
Become a Pro
speakerdeck
PRO
31
6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Done Done
chrislema
186
16k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Speed Design
sergeychernyshev
33
1.9k
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