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
自サークルのIdPからログアウトできるようになるまで
Search
taiseiue
October 05, 2026
Programming
150
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
自サークルのIdPからログアウトできるようになるまで
Kyoto.js 25
で発表した資料です
taiseiue
October 05, 2026
More Decks by taiseiue
See All by taiseiue
同人サークルを作って 8年経った僕らの現在地
taiseiue
0
280
RustでもVJしたい!
taiseiue
0
110
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
610
Kotlinのデフォルト引数の話
taiseiue
0
120
.NETの上でお手製の言語を動かす技術
taiseiue
0
130
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
490
振り向き美人
taiseiue
0
42
Tadpole operators
taiseiue
0
93
(自作の)プログラミング言語ができるまで
taiseiue
1
700
Other Decks in Programming
See All in Programming
Performance Optimization With LLMs
xleitix
0
190
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
320
phperだってパンチカードでコーディングしたい
o0h
PRO
0
390
sbt 2.0: takeoff
eed3si9n
0
170
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
180
AmebaブログはKMPから卒業します
kmars0605
0
220
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.1k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
240
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
320
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
990
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Google's AI Overviews - The New Search
badams
0
1.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
Navigating Team Friction
lara
192
16k
Ruling the World: When Life Gets Gamed
codingconduct
0
410
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
460
Transcript
自サークルのIdPから ログアウトできるようになるまで taiseiue 2026/10/5 Kyoto.js #25
JavaScript
https://www.nicovideo.jp/watch/sm1122515
https://dic.pixiv.net/a/ブラクラ
window.self • 上村太成 a.k.a. taiseiue • Kyoto.cs / CKP学生部 •
趣味: TS / Go / C# でない: TS / Go / Perl • 京都産業大学 / はてな マネーフォワード
前半の話 自サークルのIdPから ログアウトできるようになるまで 後半の話 taiseiue 今日はあんまりしない話 2026/10/5 Kyoto.js #25
None
None
None
None
None
None
自サークルのIdPから ログアウトできるようになるまで taiseiue 2026/10/5 Kyoto.js #25
https://speakerdeck.com/taiseiue/discord-oidc-proxy
https://speakerdeck.com/taiseiue/discord-oidc-proxy
https://speakerdeck.com/taiseiue/discord-oidc-proxy
https://speakerdeck.com/taiseiue/discord-oidc-proxy
一見さんもログインしてもらいたい
ロールベースのアクセス制御もしたい
fl Cloud areを挟めないサービスもある
オレオレアカウントを作る
オレオレアカウントを作る ↑たぶんやらない方がいい選択↑
None
None
None
None
😭
世間では最近ory stackが人気 https://www.ory.com/
世間では最近ory stackが人気 https://www.ory.com/
ory stackのいいところ • セルフホストできる • コンポーネントに分かれていて、 それぞれHeadlessなのでカスタムしやすい
https://www.ory.sh/docs/ecosystem/projects
アプリケーションはログインすると き、はじめory/hydraに遷移する
アプリケーションはログインすると き、はじめory/hydraに遷移する アプリケーションから見ると ory/hydraがOpenID Providerに見えている
ory/hydraは誰がログインしているか 知らないのでory/kratosに 遷移させログインさせる
ory/hydraは誰がログインしているか 知らないのでory/kratosに 遷移させログインさせる ユーザーはここでory/kratosにログインする
ory/kratosから受け取った情報を元に アプリケーションにユーザー情報を返す ここでory/hydraはユーザーに情報を渡していいかの fl 許可取り(consent ow)も行っている
かっこいい!うちもこれで!!
でももうユーザーアカウントちょっとある
😭
ory/hydraは誰がログインしているか 知らないのでory/kratosに 遷移させログインさせる ユーザーはここでory/kratosにログインする https://www.ory.sh/docs/ecosystem/projects
ory/hydraは誰がログインしているか 知らないのでory/kratosに 遷移させログインさせる ユーザーはここでory/kratosにログインする https://www.ory.sh/docs/ecosystem/projects
ory/hydraは誰がログインしているか 知らないのでAuth0に 遷移させログインさせる ユーザーはここでAuth0にログインする https://www.ory.sh/docs/ecosystem/projects
そんなこんなでできました
None
クライアント アプリケーション RP=Relying Party
OP=OpenID Provider クライアント アプリケーション RP=Relying Party
クライアント アプリケーション アカウント設定画面 Next.js製
クライアント アプリケーション アカウント設定画面 Next.js製 スタッフ側管理画面 TanStack製
Auth0のIDからAccountDBを引いてアカウント情報をhydraに渡す Go製 クライアント アプリケーション アカウント設定画面 Next.js製 ユーザーのプロフィールなどは Auth0ではなくこっちに保存 スタッフ側管理画面 TanStack製
None
自サークルのIdPから ログアウトできるようになるまで taiseiue 2026/10/5 Kyoto.js #25
ログアウトって何する処理でしょう?
CookieとかSession消したらよさそう
None
None
None
None
ここに残ったセッション情報で ログインし続けられてしまう
https://openid.net/specs/openid-connect-rpinitiated-1̲0.html
None
アプリケーションがログアウトする ときにOPのセッションを失効させる
アプリケーションがログアウトする ときにOPのセッションを失効させる
None
None
None
まだログインしたまま
https://www.ory.com/docs/hydra/guides/logout
None
hydraはログアウトしてよいかユーザーに尋ねるので、 これを利用してapps/coreがAuth0からもログアウトさせる
hydraはログアウトしてよいかユーザーに尋ねるので、 これを利用してapps/coreがAuth0からもログアウトさせる
ここはstate-lessだよ
ここはstate-lessだよ
ここはstate-lessだよ
ここはstate-lessだよ
ログアウト成功 ここはstate-lessだよ
アレ... ログアウト成功 ここはstate-lessだよ
他のアプリケーションからも ログアウトされていてほしい ログアウト成功 ここはstate-lessだよ アレ...
https://openid.net/specs/openid-connect-backchannel-1̲0.html
hydraがログアウト時に他のアプリケーションに back-channel logoutして周る ここはstate-lessだよ
None
ここはstate-lessだよ
ログアウト成功! ここはstate-lessだよ
わかったこと • 認証認可の不具合はコンポーネント単体よりも 境界面で起きる • 認証認可を設計するとき、どこに状態があるか を最初に洗い出すと良い
自サークルのIdPから ログアウトできるようになるまで taiseiue 2026/10/5 Kyoto.js #25
時間余ったとき用
None
None