Skip to content

Commit db991ec

Browse files
authored
Merge pull request #46 from tippexs/main
Fix: unhandled exception in case of `code` is not sent back to `_codexch`
2 parents 2a01413 + 57db98e commit db991ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openid_connect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function auth(r) {
103103

104104
function codeExchange(r) {
105105
// First check that we received an authorization code from the IdP
106-
if (r.variables.arg_code.length == 0) {
106+
if (r.variables.arg_code == undefined || r.variables.arg_code.length == 0) {
107107
if (r.variables.arg_error) {
108108
r.error("OIDC error receiving authorization code from IdP: " + r.variables.arg_error_description);
109109
} else {

0 commit comments

Comments
 (0)