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
OAuth2.0完全に理解した
Search
ryome
May 18, 2023
Technology
0
220
OAuth2.0完全に理解した
OAuth2.0完全に理解した
ryome
May 18, 2023
Tweet
Share
More Decks by ryome
See All by ryome
AWSデスノート〜AWSの嫌いなところまとめ〜
ryome
0
24
AWS MCPを使ってみた
ryome
0
570
ClineでAWS CDKやインフラ構成図作ってみた
ryome
1
560
PlaywrightというE2Eテストツールを布教したい
ryome
0
62
Cursorという最強エディタを使いこなしたい
ryome
0
310
E2Eテストを自動化したい
ryome
0
76
AWS CodeBuildを高速化したい
ryome
0
600
CDKでAppSyncのJavaScriptリゾルバを開発したい
ryome
0
290
Cognitoの複数IDP認証でユーザを統合したい
ryome
1
1.3k
Other Decks in Technology
See All in Technology
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
810
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
330
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
コールドスタンバイ構成でCDは可能か
hiramax
0
130
Claude Skillsの テスト業務での活用事例
moritamasami
1
130
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
0
730
AI: The stuff that nobody shows you
jnunemaker
PRO
1
130
Eight Engineering Unit 紹介資料
sansan33
PRO
0
6.1k
AWS Lambda durable functions を使って AWS Lambda の15分の壁を超えてみよう
matsuzawatakeshi
0
120
ESXi のAIOps だ!2025冬
unnowataru
0
470
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
720
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
310
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
The Cult of Friendly URLs
andyhume
79
6.7k
The Curious Case for Waylosing
cassininazir
0
200
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
34
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
220
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
270
How to train your dragon (web standard)
notwaldorf
97
6.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
58
41k
Fireside Chat
paigeccino
41
3.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
360
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
97
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