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
Laravel + Auth0 + Stripe でECサイトを作ってみた
Search
Takayuki
May 06, 2019
Programming
3
3.3k
Laravel + Auth0 + Stripe でECサイトを作ってみた
Laravel + Auth0 + Stripe でECサイトを作ってみた
Takayuki
May 06, 2019
Tweet
Share
More Decks by Takayuki
See All by Takayuki
エンジニアのキャリア論
bumptakayuki
0
110
地方カンファレンス主催のススメ
bumptakayuki
1
150
Laravelで敢えて試す脆弱性のある書き方
bumptakayuki
1
790
地方でのPHPエンジニア採用って実際どうなの?
bumptakayuki
0
530
沖縄観光、名物を一挙紹介!
bumptakayuki
2
540
Laravel ShiftでLaravelのバージョンアップしてみた話
bumptakayuki
1
1.8k
flutterでイベントアプリを作ってみた
bumptakayuki
0
110
オフショア開発の辛みと学んだ事
bumptakayuki
0
340
ChatGPTにStripeのサンプルコードを書かせてみた
bumptakayuki
1
170
Other Decks in Programming
See All in Programming
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Arm移行タイムアタック
qnighy
0
330
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
Realtime API 入門
riofujimon
0
150
Jakarta EE meets AI
ivargrimstad
0
180
役立つログに取り組もう
irof
28
9.6k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
920
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Happy Clients
brianwarren
98
6.7k
Building Adaptive Systems
keathley
38
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Speed Design
sergeychernyshev
25
620
Side Projects
sachag
452
42k
Transcript
Laravel Auth0 Laravel Auth0
3 LaravelͰͷ࣮ํ๏ Agenda 2 Auth0ͱ 1 ࣗݾհ 4 Demo
1 ࣗݾհ
4 ࣗݾհ ◆໊લ ླ ೭(Suzuki Takayuki) ◆ࣗݾհ ɾ1990ɺਆಸݝੜ·Εɻ ɾࣾձਓʹͳ͔ͬͯΒɺϓϩάϥϛϯάΛ࢝ΊΔɻ ɾ2015ʹϑϧεϐʔυʹೖࣾ͠ɺ2017ʹϑϦʔϥ
ϯεΛͬͨޙʹ201711݄ʹԭೄͰىۀɻ ◆झຯ ίεϓϨɺԻָϥΠϒɺϚϥιϯେձʹग़Δɺٿ؍ ઓ ◆Twitter @kanbo0605
Copyright Re:Build.inc All Rights Reserved. 1.ձࣾհ ◆ձ໊ࣾ גࣜձࣾRe:Build ◆ॅॴ ԭೄݝԭೄࢢதԝ̍ஸ̍̒−̕
◆ࣄۀ༰ ɾࣗࣾWEBαʔϏεͷاըɾ։ൃɻ ɾडୗ։ൃ ◆ࣾһ 5໊ ◆ΤϯδχΞͷಇ͖ํ ϦϞʔτϫʔΫՄೳͳࣗ༝ͳಇ͖ํΛਪͯ͠·͢ʂ
2 Auth0ͱ
7 Auth0ͱ ɾ֓ཁ Auth0WebΞϓϦϞόΠϧɺAPIͳͲ ʹରͯ͠ೝূɾೝՄͷαʔϏεΛΫϥυ Ͱఏڙ͍ͯ͠Δɺ͍ΘΏΔIDaaS (Identity as a Service)ϕϯμʔͰ͢ɻ
ɾΦεεϝͷํ اۀ͕ͭWebΞϓϦέʔγϣϯAPI, Native Mobile AppͳͲͰϢʔβʔೝূ ೝՄɺηΩϡϦςΟΛΈࠐΈ͍͚ͨΕ Ͳ࣮͕͍͠ɻ https://qiita.com/furuth/items/8826b66a3ec2b2b14222
8 ֤ݴޠ͝ͱͰνϡʔ τϦΞϧ͕ॆ࣮ͯ͠ ͓Γɺ؆୯ʹಋೖͰ ͖·͢ɻ ओཁͳSNSͱ΄ͱΜͲ࿈ ܞ͓ͯ͠Γɺ࿈ܞํ๏ ؆୯ͰศརͰ͢ɻ WebΞϓϦɺSPAΞϓϦωΠ ςΟϒΞϓϦͳͲʹ࿈ܞͰ
͖ͯɺϢʔβใΛҰݩཧ Ͱ͖Δɻ ؆୯ʹಋೖͰ͖Δ ϢʔβೝূΛҰݩཧͰ ͖Δ ϝϦοτɾಛ ๛ͳ࿈ܞઌ 2 ʙϝϦοτʙ 1 3
9 ๛ͳ࿈ܞઌ Auth0ͱ
1 0 ϢʔβΛҰݩཧ Auth0ͱ
11 ෳͷσόΠεʹରԠ Auth0ͱ
1 2 ྉۚମܥ https://auth0.com/pricing
3 LaravelͰͷ࣮ํ๏
ΞϓϦέʔγϣϯ ϩάΠϯ͔Βܾࡁ·ͰͷྲྀΕ /index TOPϖʔδ ৄࡉϖʔδભҠ ࣌ʹϩάΠϯ ϩάΠϯޭͨ͠Β ηογϣϯLaravelଆ Ͱཧ ೝূ
ܾࡁ ߪೖ͔Βܾࡁը໘
1 5 ެࣜͷAuth0ͷLaravelνϡʔτϦΞϧ https://auth0.com/docs/quickstart/webapp/laravel/01-login
1 6 खॱ ᶃAuth0ͷཧը໘ͰΞϓϦέʔγϣϯͷઃఆΛߦ͏ɻ ᶄLaravelΛΠϯετʔϧ ᶅcomposer require auth0/login:”~5.0" Λ࣮ߦ ᶆLoginServiceProviderΛઃఆ
ᶇphp artisan vendor:publishΛ࣮ߦ ᶈ.envΛฤू ᶉroutes/api.phpΛฤू ᶊίϯτϩʔϥΛ࡞ ᶋconfig/auth.phpΛฤू ᶌbladeϑΝΠϧΛฤू
1 7 ᶃAuth0ͷཧը໘ͰΞϓϦέʔγϣϯͷઃఆΛߦ͏ɻ
1 8 ᶄLaravelΛΠϯετʔϧ https://readouble.com/laravel/5.5/ja/installation.html
1 9 ᶅcomposer require auth0/login:”~5.0" Λ࣮ߦ Auth0ϓϥάΠϯΛΠϯετʔϧ Πϯετʔϧ͕ྃ͢Δͱɺ2ͭͷϓϥάΠϯ͕Ճ͞ΕΔɻ vendor\auth0\auth0-php vendor\auth0\login
2 0 ᶆLoginServiceProviderΛઃఆ config/app.phpΛฤू ԼهΛՃ
2 1 ᶆLoginServiceProviderΛઃఆ AppServiceProvider .phpΛฤू ԼهΛՃ
2 2 ᶇphp artisan vendor:publishΛ࣮ߦ ྃ͢Δͱɺconfig/laravel-auth0.php͕࡞͞Εɺ σϑΥϧτͷઃఆϑΝΠϧ͕ެ։͞Ε·ͨ͠ɻ
2 3 ᶈ.envΛฤू ઌ΄Ͳ࡞ͨ͠ΞϓϦέʔγϣϯʹهࡌ͞Ε͍ͯΔυϝΠϯ,ID,ύε ϫʔυΛLaravelΞϓϦέʔγϣϯͷ.envʹՃ͠·͢ɻ
2 4 ᶉroutes/api.phpΛฤू
2 5 ᶊίϯτϩʔϥΛ࡞
2 6 ᶋconfig/auth.phpΛฤू ೝূํ๏ΛAuth0ʹมߋ
2 7 ᶌbladeϑΝΠϧΛฤू
WWW.SITE2MAX.PRO Free PowerPoint & KeyNote Templates 4 DEMO EC Site
EC Site https://murmuring-tor-53965.herokuapp.com/
2 9 ࣮ࡍʹಈ͔͢
3 0 ࣮ࡍʹಈ͔͢
3 1 ࣮ࡍʹಈ͔͢
3 2 ࣮ࡍʹಈ͔͢
3 3 ࣮ࡍʹಈ͔͢
3 4 ࣮ͯ͠Έͨײ ɾ࣮͕͘͢͝؆୯ʹͰ͖ͨ(2͘Β͍ͰECαΠτ͕) ɾϩάΠϯϢʔβʹΑͬͯݖݶ͚ͨΓͱ͔ɺෳࡶͳ͜ͱ Ζ͏ͱͨ࣌͠ʹগ͠େมͦ͏ɻ ɾҰɺ࣮ͯ͠͠·͑ɺSNSͷ࿈ܞઌ૿͢ͷϘλϯ Λϙνϙν͢Δ͚ͩͰOKʂ
3 5 ࢀߟ https://qiita.com/furuth/items/8826b66a3ec2b2b14222 https://dev.classmethod.jp/cloud/auth0-overview/ https://www.hypertextcandy.com/laravel-tried-auth0
3 6 ࠂ https://phpcon.okinawa.jp/ 2019/10/12()ʹԭೄͰPHPΧϯϑΝϨϯεΛ։࠵͠·͢ʂʂʂ ͥͻདྷ͍ͯͩ͘͞ʂ