Slide 1

Slide 1 text

Tiny Mouse Node.js Passport Google 認証 SPA 使 Mobile Act NAGOYA 2018/2/16

Slide 2

Slide 2 text

自己紹介  @tinymouse_jp  SI 企業 SE  日曜  二児 父  静岡県浜松市出身  東京都品川区在住 名古屋市在住  Windows 愛用 iPhone Android  Android 会浜松支部 Android 会 Tiny Mouse

Slide 3

Slide 3 text

家計簿 作

Slide 4

Slide 4 text

家計簿 作

Slide 5

Slide 5 text

家計簿 作 Node.js nedb Electron

Slide 6

Slide 6 text

 認 証機能 加  同時 nedb 別  集計機能 追加

Slide 7

Slide 7 text

認証機能 加

Slide 8

Slide 8 text

認証 Node 個別 app.get('/ ', ... 表示

Slide 9

Slide 9 text

Passport.js  Node.js 認証

Slide 10

Slide 10 text

Node.js Express Passport 認証 Node app.get('/login', ... app.post('/login', passport.authenticate(... 表示 NG OK 認証 個別 登録 app.get('/ ', ... if (req.isAuhenticated()) ... 未 済 認証 有効 表示 表示 app.post('/regist', ...

Slide 11

Slide 11 text

Node.js Express Passport 認証 Qiita 書 https://qiita.com/tinymouse/items/fa910bf80a038c7f9ccb

Slide 12

Slide 12 text

Node.js Express Passport 認証 Node app.get('/login', ... app.post('/login', passport.authenticate(... 表示 NG OK 認証 個別 登録 app.get('/ ', ... if (req.isAuhenticated()) ... 未 済 認証 有効 表示 表示 app.post('/regist', ... 他 任

Slide 13

Slide 13 text

Node.js Passport Google 認証 使 Node 個別 app.get('/ ', ... if (req.isAuhenticated()) ... 未 済 認証 有効 app.get('/auth', passport.authenticate(... Google 表示 app.get('/auth/callback', passport.authenticate(... NG OK 認証 表示 表示 認証

Slide 14

Slide 14 text

Node.js Passport Google 認証 使 Qiita 書 https://qiita.com/tinymouse/items/ab79a14173ebc7b75274

Slide 15

Slide 15 text

SPA Node app.post('/data', ... JSON fetch('/data') .then(... app.get('/app', ... 全体 表示

Slide 16

Slide 16 text

Node OK NG 認証 登録 app.post('/regist', ... 無効 app.post('/data', passport.authenticate(... JSON fetch('/data') .then(... OK NG ID Node.js Express Passport SPA 使 一時記憶 表示

Slide 17

Slide 17 text

Node.js Express Passport SPA 使 Node OK NG 認証 登録 app.post('/regist', ... 無効 app.post('/data', passport.authenticate(... JSON fetch('/data') .then(... OK NG ID 他 任 一時記憶 表示

Slide 19

Slide 19 text

pe window.open('/auth'); 別 Node NG OK 認証 無効 app.get('/auth', passport.authenticate(... Google 表示 app.get('/auth/callback', passport.authenticate(... NG OK 認証 認証 JSON 生成 表示 取得 一時記憶 fetch('/data') .then(... OK NG app.post('/data', passport.authenticate(... 一時記憶 Node.js Passport Google 認証 SPA 使

Slide 20

Slide 20 text

Node.js Passport Google 認証 SPA 使 Qiita 書 https://qiita.com/tinymouse/items/13cbbceae9d8e7c5901c

Slide 21

Slide 21 text

家計簿 作

Slide 22

Slide 22 text

 認 証機能 加  同時 nedb 別  集計機能 追加 少

Slide 23

Slide 23 text

誰 一緒 作