[GH-ISSUE #2318] Thrown errors in oidc auth are not logged #658

Open
opened 2026-02-26 18:47:57 +03:00 by kerem · 2 comments
Owner

Originally created by @armanddidierjean on GitHub (Dec 13, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/2318

Issue Description

Hello,

When an exception is thrown in oidc authentication methods, no error is logged, and the client get a generic 500 Internal Server Error response. It is thus really difficult to understand what failed.

The issue may happen in other places, I did not have the occasion to test this.

Thank you very much for your help, and for this great tool.

Steps to Reproduce

For example, when the oidc provider does not support required scopes, an error is raised open-id.ts#L40:

  if (unsupportedScopes.length > 0) {
    throw new Error(`Requested scopes not supported by provider: ${unsupportedScopes.join(', ')}`);
  }

To test this:

  • configure an oidc provider that does not support at least one scope (eg: email)
  • try to log in with oidc

Expected Behavior

An error should be logged, explaining that the oidc provider does not support required scopes

Current Behavior

Nothing is logged. The client receive a generic 500 Internal Server Error

Screenshots (optional)

No response

Operating System [e.g., Windows 10]

macOS

Browser [e.g., Chrome, Firefox]

Firefox

Version [e.g., 2.0.1]

2.2.0

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @armanddidierjean on GitHub (Dec 13, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/2318 ### Issue Description Hello, When an exception is thrown in oidc authentication methods, no error is logged, and the client get a generic `500 Internal Server Error` response. It is thus really difficult to understand what failed. The issue may happen in other places, I did not have the occasion to test this. Thank you very much for your help, and for this great tool. ### Steps to Reproduce For example, when the oidc provider does not support required scopes, an error is raised [open-id.ts#L40](https://github.com/documenso/documenso/blob/51e3d5030d3c15a5706c682bbb9fd1aee3628228/packages/auth/server/lib/utils/open-id.ts#L40): ```ts if (unsupportedScopes.length > 0) { throw new Error(`Requested scopes not supported by provider: ${unsupportedScopes.join(', ')}`); } ``` To test this: - configure an oidc provider that does not support at least one scope (eg: email) - try to log in with oidc ### Expected Behavior An error should be logged, explaining that the oidc provider does not support required scopes ### Current Behavior Nothing is logged. The client receive a generic 500 Internal Server Error ### Screenshots (optional) _No response_ ### Operating System [e.g., Windows 10] macOS ### Browser [e.g., Chrome, Firefox] Firefox ### Version [e.g., 2.0.1] 2.2.0 ### Please check the boxes that apply to this issue report. - [x] I have searched the existing issues to make sure this is not a duplicate. - [x] I have provided steps to reproduce the issue. - [x] I have included relevant environment information. - [ ] I have included any relevant screenshots. - [x] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [ ] I want to work on creating a PR for this issue if approved
Author
Owner

@coderabbitai[bot] commented on GitHub (Dec 13, 2025):

📝 CodeRabbit Plan Mode

Generate an implementation plan and prompts that you can use with your favorite coding agent.

  • Create Plan
Examples

🔗 Similar Issues

Possible Duplicates

Related Issues

👤 Suggested Assignees


🧪 Issue enrichment is currently in early access.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false
<!-- gh-comment-id:3649942462 --> @coderabbitai[bot] commented on GitHub (Dec 13, 2025): <!-- This is an auto-generated issue plan by CodeRabbit --> ## 📝 CodeRabbit Plan Mode Generate an implementation plan and prompts that you can use with your favorite coding agent. - [ ] <!-- {"checkboxId": "8d4f2b9c-3e1a-4f7c-a9b2-d5e8f1c4a7b9"} --> Create Plan <details> <summary>Examples</summary> - [Example 1](https://github.com/coderabbitai/git-worktree-runner/issues/29#issuecomment-3589134556) - [Example 2](https://github.com/coderabbitai/git-worktree-runner/issues/12#issuecomment-3606665167) </details> ## 🔗 Similar Issues **Possible Duplicates** - https://github.com/documenso/documenso/issues/1833 **Related Issues** - https://github.com/documenso/documenso/issues/1373 - https://github.com/documenso/documenso/issues/2036 - https://github.com/documenso/documenso/issues/1732 ## 👤 Suggested Assignees - [limson8](https://github.com/limson8) - [davisafy](https://github.com/davisafy) - [MagicMuffin2](https://github.com/MagicMuffin2) - [UncleJ4ck](https://github.com/UncleJ4ck) --- <details> <summary> 🧪 Issue enrichment is currently in early access.</summary> To disable automatic issue enrichment, add the following to your `.coderabbit.yaml`: ```yaml issue_enrichment: auto_enrich: enabled: false ``` </details>
Author
Owner

@github-actions[bot] commented on GitHub (Dec 13, 2025):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:3649943527 --> @github-actions[bot] commented on GitHub (Dec 13, 2025): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#658
No description provided.