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

Add additional logging to troubleshoot failed backchannel logout issu… #632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ class ResponseContext {
res.setHeader('cache-control', 'no-store');
const logoutToken = req.body.logout_token;
if (!logoutToken) {
debug('req.oidc.backchannelLogout() failed due to missing logout token', req.body);
res.status(400).json({
error: 'invalid_request',
error_description: 'Missing logout_token',
Expand All @@ -444,6 +445,7 @@ class ResponseContext {
algorithms: [config.idTokenSigningAlg],
});
} catch (e) {
debug('req.oidc.backchannelLogout() failed verifying jwt with: %s', e.message);
res.status(400).json({
error: 'invalid_request',
error_description: e.message,
Expand All @@ -453,7 +455,7 @@ class ResponseContext {
try {
await onToken(token, config);
} catch (e) {
debug('req.oidc.backchannelLogout() failed with: %s', e.message);
debug('req.oidc.backchannelLogout() failed logging out the token with: %s', e.message);
res.status(400).json({
error: 'application_error',
error_description: `The application failed to invalidate the session.`,
Expand Down
2 changes: 1 addition & 1 deletion middleware/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const enforceLeadingSlash = (path) => {
*/
const auth = function (params) {
const config = getConfig(params);
debug('configuration object processed, resulting configuration: %O', config);
debug('configuration object processed, resulting configuration: %O', {...config, clientSecret: "REDACTED", secret: "REDACTED"});
const router = new express.Router();
const transient = new TransientCookieHandler(config);

Expand Down