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
260
0
Share
OAuth2.0完全に理解した
OAuth2.0完全に理解した
ryome
May 18, 2023
More Decks by ryome
See All by ryome
AWSデスノート〜AWSの嫌いなところまとめ〜
ryome
0
35
AWS MCPを使ってみた
ryome
0
590
ClineでAWS CDKやインフラ構成図作ってみた
ryome
1
610
PlaywrightというE2Eテストツールを布教したい
ryome
0
75
Cursorという最強エディタを使いこなしたい
ryome
0
330
E2Eテストを自動化したい
ryome
0
84
AWS CodeBuildを高速化したい
ryome
0
660
CDKでAppSyncのJavaScriptリゾルバを開発したい
ryome
0
300
Cognitoの複数IDP認証でユーザを統合したい
ryome
1
1.4k
Other Decks in Technology
See All in Technology
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
290
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
220
AI時代にデータ基盤が持つべきCapabilityを考える + Snowflake Data Superheroやっていき宣言 / Considering the Capabilities Data Platforms Should Have in the AI Era + Declaration of Commitment as a Snowflake Data Superhero
civitaspo
0
120
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
7k
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
120
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
340
Digitization部 紹介資料
sansan33
PRO
1
7.3k
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
9
4.2k
みんなで作るAWS Tips 100連発 (FinOps編)
schwrzktz
1
280
The Journey of Box Building
tagomoris
4
1.3k
#jawsugyokohama 100 LT11, "My AWS Journey 2011-2026 - kwntravel"
shinichirokawano
0
340
え!?初参加で 300冊以上 も頒布!? これは大成功!そのはずなのに わいの財布は 赤字 の件
hellohazime
0
160
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Statistics for Hackers
jakevdp
799
230k
Designing for Timeless Needs
cassininazir
0
190
Producing Creativity
orderedlist
PRO
348
40k
A Tale of Four Properties
chriscoyier
163
24k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
GraphQLとの向き合い方2022年版
quramy
50
15k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
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