aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 3c0b862..8cff430 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -162,9 +162,11 @@ app.post('/accounts/createsession', async (req, res) => {
return
}
const { access_token: accessToken, refresh_token: refreshToken } = codeExchange
- if (!accessToken)
+ if (!accessToken) {
// access token is invalid :(
+ console.log('error exchanging code:', codeExchange)
return res.json({ ok: false })
+ }
const userData = await discord.getUser(accessToken)
const sessionId = await createSession(refreshToken, userData)
res.json({ ok: true, session_id: sessionId })