Compare commits

...

2 Commits

Author SHA1 Message Date
Felipe Cardoso
38114b79f9 Mark OAuth consent page as excluded from unit tests 2025-11-26 09:52:47 +01:00
Felipe Cardoso
1cb3658369 Exclude email from user update payload in UserFormDialog 2025-11-26 09:47:10 +01:00
2 changed files with 7 additions and 2 deletions

View File

@@ -1,9 +1,15 @@
/* istanbul ignore file -- @preserve OAuth consent requires external OAuth provider flow, tested via e2e */
/**
* OAuth Consent Page
* Displays authorization consent form for OAuth provider mode (MCP integration).
*
* Users are redirected here when an external application (MCP client) requests
* access to their account. They can approve or deny the requested permissions.
*
* NOTE: This page handles OAuth consent flows and is difficult to unit test because:
* 1. It relies on URL search params from OAuth authorization requests
* 2. It has complex side effects (auth checking, API calls, redirects)
* 3. OAuth provider flows are better tested via e2e tests with mocked providers
*/
'use client';

View File

@@ -144,9 +144,8 @@ export function UserFormDialog({ open, onOpenChange, user, mode }: UserFormDialo
}
}
// Prepare update data (exclude password if empty)
// Prepare update data (exclude password if empty, email is not updatable)
const updateData: Record<string, unknown> = {
email: data.email,
first_name: data.first_name,
last_name: data.last_name || null,
is_active: data.is_active,