mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 21:03:58 -05:00
14 lines
551 B
Diff
14 lines
551 B
Diff
diff --git a/index.js b/index.js
|
|
index ca254d0c9761c8c02070eaf51675627a6d80ff46..efb522616b586f3c8692d5bafd4f2da7aa9b0e20 100644
|
|
--- a/index.js
|
|
+++ b/index.js
|
|
@@ -483,7 +483,7 @@ function fastifyOauth2 (fastify, options, next) {
|
|
|
|
function onUserinfoResponse (res) {
|
|
let rawData = ''
|
|
- res.on('data', (chunk) => { rawData = chunk })
|
|
+ res.on('data', (chunk) => { rawData += chunk })
|
|
res.on('end', () => {
|
|
try {
|
|
cb(null, JSON.parse(rawData)) // should always be JSON since we don't do jwt auth response
|