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
OAuth2.0完全に理解した
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ryome
May 18, 2023
Technology
330
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OAuth2.0完全に理解した
OAuth2.0完全に理解した
ryome
May 18, 2023
More Decks by ryome
See All by ryome
AWSデスノート〜AWSの嫌いなところまとめ〜
ryome
0
54
AWS MCPを使ってみた
ryome
0
650
ClineでAWS CDKやインフラ構成図作ってみた
ryome
1
670
PlaywrightというE2Eテストツールを布教したい
ryome
0
110
Cursorという最強エディタを使いこなしたい
ryome
0
360
E2Eテストを自動化したい
ryome
0
100
AWS CodeBuildを高速化したい
ryome
0
730
CDKでAppSyncのJavaScriptリゾルバを開発したい
ryome
0
330
Cognitoの複数IDP認証でユーザを統合したい
ryome
1
1.5k
Other Decks in Technology
See All in Technology
Claude Code on Bedrock で統制をかける小ネタ集/claude-code-bedrock-governance-tips
emiki
1
140
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
370
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
170
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
140
生成AI時代、PMは事業責任者に進化するともっと面白い〜PMだからこそ事業構造を動かせる時代に〜
kakehashi
PRO
0
220
野蛮なアジャイル [サイボウズ発!]組織の常識を覆した反骨のスクラム実践記 / Barbaric Agile - Enterprise Agile Study Group
ama_ch
0
120
Turning Repos into the Product Second Brain with an LLM Wiki
linedevth
0
130
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
「エーアイ」をバズワードにしないために RPA 導入経験と Kiro 上での Claude モデル利用経験から
kazzpapa3
0
110
【データ横丁主催】AI エージェント時代のTranslytical Data Platform
shisyu_gaku
0
210
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
5.3k
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
130
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Faster Mobile Websites
deanohume
310
32k
For a Future-Friendly Web
brad_frost
184
10k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Marketing to machines
jonoalderson
1
5.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Transcript
OAuth 2.0 完全に理解した。
OAuth 2.0とは? OAuth(オー・オース) は、Open Authorization の略。 OAuth 2.0 は、異なる2つのサービス間でユーザー情報などの リソースを共有することを可能にする、ユーザー権限の認可をおこ
なうためのスタンダードです。 ユーザーがユーザー名(IDやメールアドレス等)とパスワードをク ライアントに提供することなく、ユーザ情報の開示ができることが メリット。
OAuth 1.0とOAuth 2.0の違い • OAuth 1.0では、署名プロセスのみの認証しかサポートしていな い。 • OAuth 2.0は、より多くの認証フローをサポートしている。
(認証コードフロー、暗黙のフロー、リソース所有者パスワー ド資格情報フロー、クライアント資格情報フローなど)
OAuth 2.0のインフラ構成図
OAuth 2.0のシーケンス図 今回のサンプルは 認証コードフロー
今回作ったアプリのUI 詳しくはこちら↓ https://github.com/ryomeblog/google-oauth
環境構築説明 プロジェクト作成 • GCP: https://console.cloud.google.com/welcome
環境構築説明 クライアントIDとクライアントシークレット発行
環境構築説明 バックエンド(Lambda)デプロイ
環境構築説明 Reactアプリ起動
react-google-loginに悩まされる • 認証が通っても「popup_closed_by_user」エラーになるバグがあります。 • 2017年から直ってません。 • 「@react-oauth/google」を使いましょう。 詳しくはこちら↓ https://github.com/anthonyjgrove/react-google-login/issues/132
GitHub 今回解説した「 OAuth 2.0 」のサンプルコードは GitHubに格納しています。 GitHub URL https://github.com/ryomeblog/google-oauth
参考文献 • https://github.com/ryomeblog/google-oauth • https://github.com/anthonyjgrove/react-google- login/issues/132 • https://developers.google.com/identity/protocols/oauth 2?hl=ja