20190827_Auth0_Rules_使ってみた.pdf

 20190827_Auth0_Rules_使ってみた.pdf

06d114d3e57e11fa93697db80704200b?s=128

shuntaka9576(h0z1_576)

August 29, 2019
Tweet

Transcript

  1. Auth0 Rules ࢖ͬͯΈͨ 2019/08/29 Auth0ϢʔβʔίϛϡχςΟMeetup in ౦ژ Vol.2 shuntaka

  2. Twitter: @h0z1_576 github: shuntaka9576 ࢓ࣄ: classmethod(ࠓ݄ೖࣾ) DevelopersIO: shuntaka

  3. Rulesʹ1िؒ͘Β͍৮Εͯ ෼͔ͬͨ͜ͱΛ࿩͠·͢ʂ

  4. ॳ৺ऀ޲͚Ͱ͢ɻɻɻɻ

  5. ͦ΋ͦ΋Rules

  6. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ࢀߟ: https://auth0.com/docs/rules
  7. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ϩάΠϯ
  8. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ϩάΠϯ *%1SPWJEFSͰೝূ
  9. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ੍ޚ͕8FCΞϓ Ϧʹ໭Δ ϩάΠϯ *%1SPWJEFSͰೝূ
  10. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ϩάΠϯ ੍ޚ͕8FCΞϓϦʹ໭Δ *%1SPWJEFSͰೝূ
  11. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ϩάΠϯ 8FCΞϓϦʹ੍ޚ͕໭Δ ೚ҙͷίʔυ͕࣮ߦͰ͖Δ! *%1SPWJEFSͰೝূ
  12. ࣮ߦ؀ڥʹ͍ͭͯ

  13. ɾϥϯλΠϜ ɾར༻ՄೳͳϥΠϒϥϦ ࢀߟ: 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ࢀর
  14. RulesͷϢʔεέʔε

  15. %BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ ΫϥΠΞϯτ͕஌ͬͯஔ͖ ͍ͨ৘ใΛऔಘ ࣾ಺API CRMج൫
  16. %BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ JE@UPLFOʹؚΊͯ ΫϥΠΞϯτʹ఻͑Δ ࣾ಺API CRMج൫
  17. ৄࡉ͸ϒϩάʹ https://dev.classmethod.jp/etc/shuntaka9576-rules2/

  18. ⚠ ஫ҙ఺ ⚠

  19. %BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF

    3VMF 3VMF/ ɾ ɾ ɾ 20ඵͷ࣮ߦ੍ݶ͋Γ ࢀߟ: https://auth0.com/docs/best-practices/rules
  20. ޮ཰Α͍ίʔυΛॻͨ͘Ίʹɺ ࢖͑ΔΦϒδΣΫτΛ೺Ѳ͠·͠ΐ͏

  21. 4BOECPY 8FCUBTL configuration context user auth0 global 3VMF 3VMF 3VMF/

    ɾɾɾ
  22. 4BOECPY 8FCUBTL configuration context user auth0 global 3VMF 3VMF 3VMF/

    ɾɾɾ ɾෳ਺ͷϧʔϧ͔ΒࢀরՄೳ ɾϋΠίετͳม਺Λอଘ͢ΔྖҬ
  23. 4BOECPY 8FCUBTL context user auth0 global 3VMF 3VMF 3VMF/ ɾɾɾ

    configuration ɾઃఆͨ͠؀ڥม਺͕ར༻Մೳ ɹ(APIΩʔͳͲͷػີ৘ใ֨ೲ৔ॴ)
  24. 4BOECPY 8FCUBTL context user global configuration auth0 3VMF 3VMF 3VMF/

    ɾɾɾ "VUI .BOBHFNFOU"1*W ɾAuth0ͷAPIΛݺͼग़͠Մೳ ɾݖݶ͸userͷread,updateʹݶΒΕΔ
  25. 4BOECPY 8FCUBTL configuration user auth0 global context 3VMF 3VMF 3VMF/

    ɾɾɾ ɾϩάΠϯͨ͠ϢʔβʔͷίϯςΩετ৘ใ (IPΞυϨεɺΞϓϦέʔγϣϯ౳)
  26. 4BOECPY 8FCUBTL configuration auth0 context global 3VMF user 3VMF 3VMF/

    ɾɾɾ ɾϩάΠϯͨ͠Ϣʔβʔͷ৘ใ͕औಘՄೳ ɾσϑΥϧτͷid_tokenΑΓ΋ৄࡉͳ৘ใ͕औΕΔ
  27. ৄࡉ͸ϒϩάʹ(ຊ೔2౓໨) https://dev.classmethod.jp/etc/shuntaka9576-auth0-rules/

  28. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ