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
20190827_Auth0_Rules_使ってみた.pdf
Search
shuntaka
August 29, 2019
Technology
0
280
20190827_Auth0_Rules_使ってみた.pdf
shuntaka
August 29, 2019
Tweet
Share
More Decks by shuntaka
See All by shuntaka
サーバーレスAPI(API Gateway+Lambda)とNext.jsで 個人ブログを作ろう!
shuntaka
0
950
NestJS Prisma on Fargate構成で作るWeb API開発Tips
shuntaka
1
15k
GoとServer-Sent Events
shuntaka
0
8.7k
GoでDynamoDBのCLI(便利)を作った
shuntaka
0
110
AWSのCI/CDサービスを試してみた!
shuntaka
0
230
Goでブラウザ業務を自動化する
shuntaka
0
2.2k
Other Decks in Technology
See All in Technology
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
630
AIチャットボット開発への生成AI活用
ryomrt
0
170
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
110
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
いざ、BSC討伐の旅
nikinusu
2
780
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Facilitating Awesome Meetings
lara
50
6.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Designing for humans not robots
tammielis
250
25k
Scaling GitHub
holman
458
140k
Bash Introduction
62gerente
608
210k
Faster Mobile Websites
deanohume
305
30k
Transcript
Auth0 Rules ͬͯΈͨ 2019/08/29 Auth0ϢʔβʔίϛϡχςΟMeetup in ౦ژ Vol.2 shuntaka
Twitter: @shuntaka_jp github: shuntaka9576 ࣄ: classmethod(ࠓ݄ೖࣾ) DevelopersIO: shuntaka
Rulesʹ1िؒ͘Β͍৮Εͯ ͔ͬͨ͜ͱΛ͠·͢ʂ
ॳ৺ऀ͚Ͱ͢ɻɻɻɻ
ͦͦRules
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ࢀߟ: https://auth0.com/docs/rules
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ੍ޚ͕8FCΞϓ ϦʹΔ ϩάΠϯ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ ੍ޚ͕8FCΞϓϦʹΔ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ 8FCΞϓϦʹ੍ޚ͕Δ ҙͷίʔυ͕࣮ߦͰ͖Δ! *%1SPWJEFSͰೝূ
࣮ߦڥʹ͍ͭͯ
ɾϥϯλΠϜ ɾར༻ՄೳͳϥΠϒϥϦ ࢀߟ: https://auth0.com/docs/rules/references/modules (https://auth0-extensions.github.io/canirequire/) (8/27 ࣌ process.versions.nodeͰग़ྗ݁Ռɺ8.11.4) ES6ͱNode.js(version8Ҏ߱)Λαϙʔτ async/awaitར༻Մೳʂ
Can I require: Auth0 Extensibilityࢀর
RulesͷϢʔεέʔε
%BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ΫϥΠΞϯτ͕ͬͯஔ͖ ͍ͨใΛऔಘ ࣾAPI CRMج൫
%BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ JE@UPLFOʹؚΊͯ ΫϥΠΞϯτʹ͑Δ ࣾAPI CRMج൫
ৄࡉϒϩάʹ https://dev.classmethod.jp/etc/shuntaka9576-rules2/
⚠ ҙ ⚠
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ 20ඵͷ࣮ߦ੍ݶ͋Γ ࢀߟ: https://auth0.com/docs/best-practices/rules
ޮΑ͍ίʔυΛॻͨ͘Ίʹɺ ͑ΔΦϒδΣΫτΛѲ͠·͠ΐ͏👊
4BOECPY 8FCUBTL con fi guration context user auth0 global 3VMF
3VMF 3VMF/ ɾɾɾ
4BOECPY 8FCUBTL con fi guration context user auth0 global 3VMF
3VMF 3VMF/ ɾɾɾ ɾෳͷϧʔϧ͔ΒࢀরՄೳ ɾϋΠίετͳมΛอଘ͢ΔྖҬ
4BOECPY 8FCUBTL context user auth0 global 3VMF 3VMF 3VMF/ ɾɾɾ
con fi guration ɾઃఆͨ͠ڥม͕ར༻Մೳ ɹ(APIΩʔͳͲͷػີใ֨ೲॴ)
4BOECPY 8FCUBTL context user global con fi guration auth0 3VMF
3VMF 3VMF/ ɾɾɾ "VUI .BOBHFNFOU"1*W ɾAuth0ͷAPIΛݺͼग़͠Մೳ ɾݖݶuserͷread,updateʹݶΒΕΔ
4BOECPY 8FCUBTL con fi guration user auth0 global context 3VMF
3VMF 3VMF/ ɾɾɾ ɾϩάΠϯͨ͠ϢʔβʔͷίϯςΩετใ (IPΞυϨεɺΞϓϦέʔγϣϯ)
4BOECPY 8FCUBTL con fi guration auth0 context global 3VMF user
3VMF 3VMF/ ɾɾɾ ɾϩάΠϯͨ͠Ϣʔβʔͷใ͕औಘՄೳ ɾσϑΥϧτͷid_tokenΑΓৄࡉͳใ͕औΕΔ
ৄࡉϒϩάʹ(ຊ2) https://dev.classmethod.jp/etc/shuntaka9576-auth0- rules/
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ