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
react-query-auth + gin-jwtでユーザ認証
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
τ μ [taumu]
March 19, 2022
Programming
870
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
react-query-auth + gin-jwtでユーザ認証
τ μ [taumu]
March 19, 2022
More Decks by τ μ [taumu]
See All by τ μ [taumu]
購入/決済のACIDを守るための冪等性の話
taumu
0
60
自作AIアプリの品質を上げるためにプロンプトエンジニアリングに再入門する
taumu
0
41
AIによる商品説明文生成〜よい説明文をとは何かを考える
taumu
0
57
CI改善もDatadogとともに
taumu
0
400
総合トップグロースに向けた負債返済のお話
taumu
0
1.3k
Gatsby + React + Redux によるゼロリスク・ハイリターンな個人開発
taumu
2
1.5k
Other Decks in Programming
See All in Programming
パーソナライズPodcastを作った話
repunit11
0
120
Heart of Swift Concurrency
koher
0
1.2k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
310
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
340
The Rails Doctrine Decade
koic
2
490
APNsからLive Activityを開始する話
yumnumm
0
150
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
390
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
140
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
620
Java 27新機能 / Java 27 new features
kishida
2
200
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
900
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
590
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
Designing for Performance
lara
611
70k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
Mobile First: as difficult as doing things right
swwweet
225
10k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
Transcript
react-query-auth + gin-jwtで ユーザ認証 t-morisawa / taumu
アジェンダ ✦ ユーザ認証デモ ✦ 全体図 ✦ react-query-authについて
ユーザ認証のデモ ✦ ログイン ✦ ログアウト ✦ ログインチェック (セッション切れの 場合ログアウト)
ユーザ認証のデモ ✦ ログイン ✦ ログアウト ✦ ログインチェック (セッション切れの 場合ログアウト)
全体図 フロントエンド バックエンド react + react-query + react-query-auth go +
gin + gin-jwt ログイン / サインアップ id/pass jwt ローカルスト レージに保存 JWTの署名・エンコード を行ってくれるので、 自前実装は不要👍
全体図 フロントエンド バックエンド react + react-query + react-query-auth go +
gin + gin-jwt ログアウト ローカルストレージの JWT削除 ログアウトのインターフェースは 提供されているが、実装は自分で用意 する必要あり。 ex. Cookieの削除、JWTのブラックリ スト化
全体図 フロントエンド バックエンド react + react-query + react-query-auth go +
gin + gin-jwt ログインチェック response=falseの場合、ローカルストレー ジのJWTを削除してログアウト ログインチェックは 随時実行してくれる 自前での呼び出し不要👍 JWT User/false +85ͷվ᜵νΣοΫ ظݶνΣοΫΛ࣮ߦ
全体図 フロントエンド バックエンド react + react-query + react-query-auth go +
gin + gin-jwt ログインフロントエンド用の インターフェース 自動ログインチェック機能 ログインバックエンド用の インターフェース JWTの作成・チェック
react-query-authʹ͍ͭͯ ✦ https://zenn.dev/taumu/articles/9a979429fde590
·ͱΊ ✦ react-query-auth + gin-jwtでユーザ認証 ✦ JWTやユーザ認証に関する知識が乏しくても、ライブラリのレールに 沿って実装すれば、認証機構が実装できる ✦ react-query-authはログインチェックAPIのキャッシュ・refetchをい
い感じにやってくれる