Skip to content

fix: done called multiple times on invalid token#4

Open
jaredthirsk wants to merge 8 commits intosen-su:masterfrom
jaredthirsk:master
Open

fix: done called multiple times on invalid token#4
jaredthirsk wants to merge 8 commits intosen-su:masterfrom
jaredthirsk:master

Conversation

@jaredthirsk
Copy link
Copy Markdown

If an invalid token is provided, I believe done(null, false, { message: 'invalid token' }) is invoked, then it falls through to user.confirmSession which calls done again, which causes an exception in node about setting the headers on the response too many times. This change only does the second half if the first done isn't reached.

(My editor was also set up to do some massive reformatting on save :-/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant