nicholastay / passport-discord

Passport strategy for authentication with Discord (discordapp.com)
ISC License
172 stars 55 forks source link

Make errors more verbose #6

Open crazyredd opened 7 years ago

crazyredd commented 7 years ago

I just spent the last couple of hours trying to get this library to work, only to find that my client secret was being set to my client id. I unfortunately do not have a node debugger available to me, so I couldn't find where the auth was failing. I did get an error displayed while logging in, but I put this behind a try-catch statement to make sure nothing was sent to the user. This only said "Error". That's it.

I then eventually opened up the source file and went to the offending line. I logged the variables and found that it was bad client credentials.

A chain of dumb mistakes I will concede, but please spare other devs from this frustration by being more specific about errors.