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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ryome
May 18, 2023
Technology
320
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
53
AWS MCPを使ってみた
ryome
0
640
ClineでAWS CDKやインフラ構成図作ってみた
ryome
1
650
PlaywrightというE2Eテストツールを布教したい
ryome
0
100
Cursorという最強エディタを使いこなしたい
ryome
0
360
E2Eテストを自動化したい
ryome
0
100
AWS CodeBuildを高速化したい
ryome
0
730
CDKでAppSyncのJavaScriptリゾルバを開発したい
ryome
0
320
Cognitoの複数IDP認証でユーザを統合したい
ryome
1
1.5k
Other Decks in Technology
See All in Technology
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
330
企業の現実世界をグラフで写し取る
sansantech
PRO
0
220
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
360
なぜAI任せのゲームは面白くならないのか?
hirohasuyoutube
0
350
The seven pitfalls of AI (revised version)
ufried
0
160
Harness Engineering on Rails
joelq
0
770
セルフサービスのオブザーバビリティ基盤をOpenTelemetryで作る / Building a Self-Service Observability Platform with OpenTelemetry
ymotongpoo
3
500
私の推しは「聞いてから進む」AIです -AI-DLCに一人でアプリを作らせた話
yama3133
0
140
いちAWSエンジニアのAI活用を振り返る #devio2026 / devio osaka 2026 kawahara
masahirokawahara
1
290
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
270
Swap and Memory Reclaim - Squeezing Out More RAM
ennael
PRO
1
1.4k
The kernel report
ennael
PRO
1
160
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
730
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
YesSQL, Process and Tooling at Scale
rocio
174
15k
KATA
mclloyd
PRO
35
16k
How Software Deployment tools have changed in the past 20 years
geshan
2
34k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Building Adaptive Systems
keathley
44
3.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
520
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