[PR #1208] [MERGED] feat: allow oidc only signup and trust mail addresses #1474

Closed
opened 2026-02-26 19:33:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1208
Author: @Rainson12
Created: 6/29/2024
Status: Merged
Merged: 7/31/2024
Merged by: @Mythie

Base: mainHead: feat/allow-oidc-only-signup-and-trust-email


📝 Commits (3)

  • 48e721a feat: allow oidc only signup and trust mail addresses
  • b73d561 chore: minor updates
  • 70980e6 Merge branch 'main' into feat/allow-oidc-only-signup-and-trust-email

📊 Changes

6 files changed (+38 additions, -23 deletions)

View changed files

📝 .env.example (+4 -0)
📝 apps/web/process-env.d.ts (+2 -0)
📝 apps/web/src/pages/api/auth/[...nextauth].ts (+12 -2)
📝 packages/lib/next-auth/auth-options.ts (+10 -1)
📝 packages/tsconfig/process-env.d.ts (+2 -0)
📝 turbo.json (+8 -20)

📄 Description

Description

This change will allow for user registration when users are federated through oidc provider even if the general signup is disabled additionally the users email address can now be automatically set as trusted. This will force corporate users to signin using SSO instead of creating manual accounts.

Changes Made

  • added NEXT_PRIVATE_OIDC_ALLOW_SIGNUP environment variable to allow for oidc signup even if general signup is disabled
  • added NEXT_PRIVATE_OIDC_TRUST_EMAILADDRESSES environment variable to set emailVerified to true when user is registered due to oidc login

Testing Performed

  • Tested with entra id oidc login with and without environment variables set.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added support for controlling signups and email verification based on new environment variables.
  • Configuration

    • Introduced NEXT_PRIVATE_OIDC_ALLOW_SIGNUP and NEXT_PRIVATE_OIDC_SKIP_VERIFY environment variables for enhanced OIDC configurations.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1208 **Author:** [@Rainson12](https://github.com/Rainson12) **Created:** 6/29/2024 **Status:** ✅ Merged **Merged:** 7/31/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/allow-oidc-only-signup-and-trust-email` --- ### 📝 Commits (3) - [`48e721a`](https://github.com/documenso/documenso/commit/48e721a318882b107e3e3ca6ea41748cbb5da5ed) feat: allow oidc only signup and trust mail addresses - [`b73d561`](https://github.com/documenso/documenso/commit/b73d5610d0a6d1f1db5a0aa156436fde3b673dca) chore: minor updates - [`70980e6`](https://github.com/documenso/documenso/commit/70980e6d2d47c5a1a722619e4d62f5f0520d0310) Merge branch 'main' into feat/allow-oidc-only-signup-and-trust-email ### 📊 Changes **6 files changed** (+38 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -0) 📝 `apps/web/process-env.d.ts` (+2 -0) 📝 `apps/web/src/pages/api/auth/[...nextauth].ts` (+12 -2) 📝 `packages/lib/next-auth/auth-options.ts` (+10 -1) 📝 `packages/tsconfig/process-env.d.ts` (+2 -0) 📝 `turbo.json` (+8 -20) </details> ### 📄 Description ## Description This change will allow for user registration when users are federated through oidc provider even if the general signup is disabled additionally the users email address can now be automatically set as trusted. This will force corporate users to signin using SSO instead of creating manual accounts. ## Changes Made - added NEXT_PRIVATE_OIDC_ALLOW_SIGNUP environment variable to allow for oidc signup even if general signup is disabled - added NEXT_PRIVATE_OIDC_TRUST_EMAILADDRESSES environment variable to set emailVerified to true when user is registered due to oidc login ## Testing Performed - Tested with entra id oidc login with and without environment variables set. ## Checklist - [X] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [X] I have followed the project's coding style guidelines. - [X] I have addressed the code review feedback from the previous submission, if applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added support for controlling signups and email verification based on new environment variables. - **Configuration** - Introduced `NEXT_PRIVATE_OIDC_ALLOW_SIGNUP` and `NEXT_PRIVATE_OIDC_SKIP_VERIFY` environment variables for enhanced OIDC configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:25 +03:00
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#1474
No description provided.