Skip to content

Commit b23b575

Browse files
committed
fix invalid error passing
1 parent 717c3e8 commit b23b575

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const microAuthGithub = ({ clientId, clientSecret, callbackUrl, path = '/auth/gi
3737

3838
if (!states.includes(state)) {
3939
const err = new Error('Invalid state');
40-
return fn(req, res, { err, provider });
40+
args.push({ err, provider });
41+
return fn(req, res, ...args);
4142
}
4243

4344
states.splice(states.indexOf(state), 1);

0 commit comments

Comments
 (0)