express-openid-connect icon indicating copy to clipboard operation
express-openid-connect copied to clipboard

AuthorizationParameters.nonce is discarded.

Open timvanoostrom opened this issue 8 months ago • 1 comments

Checklist

Description

I'm not entirely sure if it's a bug in the interface or in the application code or part of functionality that I don't understand yet but here goes:

The nonce option in LoginOptions.authorizationParams interface is not used in auth_verification cookie. See also: https://github.com/auth0/express-openid-connect/blob/master/lib/context.js#L245-L258 and https://github.com/auth0/express-openid-connect/blob/master/lib/context.js#L286

If not used in the cookie, where is it for?

Reproduction

  1. Use own login route
  2. Provide authorizationParams.nonce value
  3. Inspect auth_verification cookie
res.oidc.login({
  authorizationParams: { nonce: 'test-nonce' },
});

Additional context

No response

express-openid-connect version

2.17.1

Express version

4.18.3

Node.js version

v21.7.3

timvanoostrom avatar May 29 '24 18:05 timvanoostrom