From 75626d4dbd481ebd4def6c578dd1af62f1abc47e Mon Sep 17 00:00:00 2001 From: "Lukas Scheuerle (Plagiatus)" Date: Wed, 9 Dec 2020 11:47:41 +0100 Subject: [PATCH] update example to new data structure --- index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 140e51e..71b6615 100755 --- a/index.js +++ b/index.js @@ -92,14 +92,16 @@ var template = handlebars.compile(` - - - -
Access Token{{accessToken}}
Refresh Token{{refreshToken}}
Display Name{{display_name}}
Bio{{bio}}
Image{{logo}}
`); + Display Name{{data.[0].display_name}} + Bio{{data.[0].description}} + Image{{data.[0].profile_image_url}} + +`); // If user has an authenticated session, display it, otherwise display link to authenticate app.get('/', function (req, res) { if(req.session && req.session.passport && req.session.passport.user) { + console.log(req.session.passport.user); res.send(template(req.session.passport.user)); } else { res.send('Twitch Auth Sample');