Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch between types and implementation for transactionCookie #334

Closed
jeffrson opened this issue Feb 18, 2022 · 1 comment · Fixed by #335
Closed

Mismatch between types and implementation for transactionCookie #334

jeffrson opened this issue Feb 18, 2022 · 1 comment · Fixed by #335
Labels
bug Something isn't working

Comments

@jeffrson
Copy link

Describe the problem

The new types (2.7.0) require transactionCookie inside routes: https://github.com/auth0/express-openid-connect/blob/master/index.d.ts#L441

However, in https://github.com/auth0/express-openid-connect/blob/master/lib/config.js#L83, transactionCookie is a top-level configuration, not contained in routes (https://github.com/auth0/express-openid-connect/blob/master/lib/config.js#L184), which leads to this error message:

TypeError: "routes.transactionCookie" is not allowed,
at module.exports.get (/usr/src/app/.yarn/virtual/express-openid-connect-virtual-9917d258a9/0/cache/express-openid-connect-npm-2.7.0-b65e4d8088-0fc538a46b.zip/node_modules/express-openid-connect/lib/config.js:222:11),
at auth (/usr/src/app/.yarn/virtual/express-openid-connect-virtual-9917d258a9/0/cache/express-openid-connect-npm-2.7.0-b65e4d8088-0fc538a46b.zip/node_modules/express-openid-connect/middleware/auth.js:28:18),

What was the expected behavior?

Run, without error.

Environment

  • Version of this library used: 2.7.0
  • Which framework are you using, if applicable:
  • Other modules/plugins/libraries that might be involved:
  • Any other relevant information you think would be useful:
@jeffrson jeffrson changed the title Mismatch between types and implementation for transactionCookie? Mismatch between types and implementation for transactionCookie Feb 18, 2022
@adamjmcgrath adamjmcgrath added the bug Something isn't working label Feb 18, 2022
@adamjmcgrath
Copy link
Contributor

Thanks for raising - the types are wrong (the config is correct)

#335 should fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants