Slide 1

Slide 1 text

Laravel Auth0 Laravel Auth0

Slide 2

Slide 2 text

3 LaravelͰͷ࣮૷ํ๏ Agenda 2 Auth0ͱ͸ 1 ࣗݾ঺հ 4 Demo

Slide 3

Slide 3 text

1 ࣗݾ঺հ

Slide 4

Slide 4 text

4 ࣗݾ঺հ ◆໊લ ླ໦ ޹೭(Suzuki Takayuki) ◆ࣗݾ঺հ ɾ1990೥ɺਆಸ઒ݝੜ·Εɻ ɾࣾձਓʹͳ͔ͬͯΒɺϓϩάϥϛϯάΛ࢝ΊΔɻ ɾ2015೥ʹϑϧεϐʔυʹೖࣾ͠ɺ2017೥ʹϑϦʔϥ ϯεΛ΍ͬͨޙʹ2017೥11݄ʹԭೄͰىۀɻ ◆झຯ ίεϓϨɺԻָϥΠϒɺϚϥιϯେձʹग़Δɺ໺ٿ؍ ઓ ◆Twitter @kanbo0605

Slide 5

Slide 5 text

Copyright Re:Build.inc All Rights Reserved. 1.ձࣾ঺հ ◆ձ໊ࣾ גࣜձࣾRe:Build ◆ॅॴ ԭೄݝԭೄࢢதԝ̍ஸ໨̍̒−̕ ◆ࣄۀ಺༰ ɾࣗࣾWEBαʔϏεͷاըɾ։ൃɻ ɾडୗ։ൃ ◆ࣾһ 5໊ ◆ΤϯδχΞͷಇ͖ํ ϦϞʔτϫʔΫՄೳͳࣗ༝ͳಇ͖ํΛਪ঑ͯ͠·͢ʂ

Slide 6

Slide 6 text

2 Auth0ͱ͸

Slide 7

Slide 7 text

7 Auth0ͱ͸ ɾ֓ཁ Auth0͸WebΞϓϦ΍ϞόΠϧɺAPIͳͲ ʹରͯ͠ೝূɾೝՄͷαʔϏεΛΫϥ΢υ Ͱఏڙ͍ͯ͠Δɺ͍ΘΏΔIDaaS (Identity as a Service)ϕϯμʔͰ͢ɻ ɾΦεεϝͷํ اۀ͕΋ͭWebΞϓϦέʔγϣϯ΍API, Native Mobile AppͳͲͰϢʔβʔೝূ΍ ೝՄɺηΩϡϦςΟΛ૊ΈࠐΈ͍͚ͨΕ Ͳ΋࣮૷͕೉͍͠ɻ https://qiita.com/furuth/items/8826b66a3ec2b2b14222

Slide 8

Slide 8 text

8 ֤ݴޠ͝ͱͰνϡʔ τϦΞϧ͕ॆ࣮ͯ͠ ͓Γɺ؆୯ʹಋೖͰ ͖·͢ɻ ओཁͳSNSͱ΄ͱΜͲ࿈ ܞ͓ͯ͠Γɺ࿈ܞํ๏΋ ؆୯ͰศརͰ͢ɻ WebΞϓϦɺSPAΞϓϦωΠ ςΟϒΞϓϦͳͲʹ΋࿈ܞͰ ͖ͯɺϢʔβ৘ใΛҰݩ؅ཧ ΋Ͱ͖Δɻ ؆୯ʹಋೖͰ͖Δ ϢʔβೝূΛҰݩ؅ཧͰ ͖Δ ϝϦοτɾಛ௃ ๛෋ͳ࿈ܞઌ 2 ʙϝϦοτʙ 1 3

Slide 9

Slide 9 text

9 ๛෋ͳ࿈ܞઌ Auth0ͱ͸

Slide 10

Slide 10 text

1 0 ϢʔβΛҰݩ؅ཧ Auth0ͱ͸

Slide 11

Slide 11 text

11 ෳ਺ͷσόΠεʹରԠ Auth0ͱ͸

Slide 12

Slide 12 text

1 2 ྉۚମܥ https://auth0.com/pricing

Slide 13

Slide 13 text

3 LaravelͰͷ࣮૷ํ๏

Slide 14

Slide 14 text

ΞϓϦέʔγϣϯ ϩάΠϯ͔Βܾࡁ·ͰͷྲྀΕ /index TOPϖʔδ΁ ঎඼ৄࡉϖʔδભҠ ࣌ʹϩάΠϯ ϩάΠϯ੒ޭͨ͠Β ηογϣϯ͸Laravelଆ Ͱ؅ཧ ೝূ ܾࡁ ঎඼ߪೖ͔Βܾࡁը໘΁

Slide 15

Slide 15 text

1 5 ެࣜͷAuth0ͷLaravelνϡʔτϦΞϧ https://auth0.com/docs/quickstart/webapp/laravel/01-login

Slide 16

Slide 16 text

1 6 खॱ ᶃAuth0ͷ؅ཧը໘ͰΞϓϦέʔγϣϯͷઃఆΛߦ͏ɻ ᶄLaravelΛΠϯετʔϧ ᶅcomposer require auth0/login:”~5.0" Λ࣮ߦ ᶆLoginServiceProviderΛઃఆ ᶇphp artisan vendor:publishΛ࣮ߦ ᶈ.envΛฤू ᶉroutes/api.phpΛฤू ᶊίϯτϩʔϥΛ࡞੒ ᶋconfig/auth.phpΛฤू ᶌbladeϑΝΠϧΛฤू

Slide 17

Slide 17 text

1 7 ᶃAuth0ͷ؅ཧը໘ͰΞϓϦέʔγϣϯͷઃఆΛߦ͏ɻ

Slide 18

Slide 18 text

1 8 ᶄLaravelΛΠϯετʔϧ https://readouble.com/laravel/5.5/ja/installation.html

Slide 19

Slide 19 text

1 9 ᶅcomposer require auth0/login:”~5.0" Λ࣮ߦ Auth0ϓϥάΠϯΛΠϯετʔϧ Πϯετʔϧ͕׬ྃ͢Δͱɺ2ͭͷϓϥάΠϯ͕௥Ճ͞ΕΔɻ vendor\auth0\auth0-php vendor\auth0\login

Slide 20

Slide 20 text

2 0 ᶆLoginServiceProviderΛઃఆ config/app.phpΛฤू ԼهΛ௥Ճ

Slide 21

Slide 21 text

2 1 ᶆLoginServiceProviderΛઃఆ AppServiceProvider .phpΛฤू ԼهΛ௥Ճ

Slide 22

Slide 22 text

2 2 ᶇphp artisan vendor:publishΛ࣮ߦ ׬ྃ͢Δͱɺconfig/laravel-auth0.php͕࡞੒͞Εɺ σϑΥϧτͷઃఆϑΝΠϧ͕ެ։͞Ε·ͨ͠ɻ

Slide 23

Slide 23 text

2 3 ᶈ.envΛฤू ઌ΄Ͳ࡞੒ͨ͠ΞϓϦέʔγϣϯʹهࡌ͞Ε͍ͯΔυϝΠϯ,ID,ύε ϫʔυΛLaravelΞϓϦέʔγϣϯͷ.envʹ௥Ճ͠·͢ɻ

Slide 24

Slide 24 text

2 4 ᶉroutes/api.phpΛฤू

Slide 25

Slide 25 text

2 5 ᶊίϯτϩʔϥΛ࡞੒

Slide 26

Slide 26 text

2 6 ᶋconfig/auth.phpΛฤू ೝূํ๏ΛAuth0ʹมߋ

Slide 27

Slide 27 text

2 7 ᶌbladeϑΝΠϧΛฤू

Slide 28

Slide 28 text

WWW.SITE2MAX.PRO Free PowerPoint & KeyNote Templates 4 DEMO EC Site EC Site https://murmuring-tor-53965.herokuapp.com/

Slide 29

Slide 29 text

2 9 ࣮ࡍʹಈ͔͢

Slide 30

Slide 30 text

3 0 ࣮ࡍʹಈ͔͢

Slide 31

Slide 31 text

3 1 ࣮ࡍʹಈ͔͢

Slide 32

Slide 32 text

3 2 ࣮ࡍʹಈ͔͢

Slide 33

Slide 33 text

3 3 ࣮ࡍʹಈ͔͢

Slide 34

Slide 34 text

3 4 ࣮૷ͯ͠Έͨײ૝ ɾ࣮૷͕͘͢͝؆୯ʹͰ͖ͨ(2೔͘Β͍ͰECαΠτ͕׬੒) ɾϩάΠϯϢʔβʹΑͬͯݖݶ෼͚ͨΓͱ͔ɺෳࡶͳ͜ͱ΍ Ζ͏ͱͨ࣌͠ʹগ͠େมͦ͏ɻ ɾҰ౓ɺ࣮૷ͯ͠͠·͑͹ɺSNSͷ࿈ܞઌ૿΍͢ͷ͸Ϙλϯ Λϙνϙν͢Δ͚ͩͰOKʂ

Slide 35

Slide 35 text

3 5 ࢀߟ https://qiita.com/furuth/items/8826b66a3ec2b2b14222 https://dev.classmethod.jp/cloud/auth0-overview/ https://www.hypertextcandy.com/laravel-tried-auth0

Slide 36

Slide 36 text

3 6 ࠂ஌ https://phpcon.okinawa.jp/ 2019/10/12(౔)ʹԭೄͰPHPΧϯϑΝϨϯεΛ։࠵͠·͢ʂʂʂ ͥͻདྷ͍ͯͩ͘͞ʂ