feat(auth): extra Apple OAuth clients in Admin - #311
Open
ChrisPdgn wants to merge 5 commits into
Open
Conversation
cursor Bot
pushed a commit
that referenced
this pull request
Sep 1, 2026
…ntial badges Steal UI patterns from #296 (kkopanidis feat/apple-multi-oauth-clients): - Collapsible default-client and extra-client rows (collapsed by default) - Credential completeness badge (Not configured / Incomplete / Credentials complete) - Compact header with title + subtitle (nickname / Apple app id) - Add/remove extra client in that layout - Grid layout for responsive form fields Keep all fixes from #311: - Wholesale replace of apple on save (no lodash-merge of clients[]) - Inherit vs second team validation (all three creds or none) - Unique trimmed nickname with errors on row - Whitespace-only extra creds/redirect_uri → '' on submit - Enabling Apple requires default clientId + privateKey + teamId + keyId - Plain-language copy: 'nickname', 'Apple app ID', 'leave empty to reuse the default key' - Extra creds stay optional in type - Do NOT relabel extra id as 'Client ID (oauthClientId)' - keep the plain language No changes to Microsoft or generic OAuth forms.
cursor Bot
pushed a commit
that referenced
this pull request
Sep 1, 2026
…th errors 1. Extra-client credential badge now ONLY counts the three creds (teamId, keyId, privateKey): - 0 filled = 'Reuses default' (inherits default credentials) - 3 filled = 'Second team' (has its own credentials) - 1-2 filled = 'Incomplete' (mixed credentials, blocked by validation) Do not include clientId/id/name in extra-client badge count since clientId is always required. Default client badge still uses all four fields. 2. After validation failure, auto-open collapsible sections that contain errors: - Default client section opens if it has validation errors - Extra client rows with errors (nickname/mixed creds) open automatically - Prevents hiding validation errors inside collapsed sections - Uses controlled Collapsible state with React state + useEffect Keep all #311 fixes: wholesale apple replace, inherit/mixed/unique/keyId validation, whitespace normalize.
ChrisPdgn
marked this pull request as ready for review
September 10, 2026 12:51
- Add AppleExtraClient type with id, clientId, name, redirect_uri, privateKey, teamId, keyId - Implement useFieldArray in AppleConfigForm for dynamic client management - Add Zod validation for unique nicknames and all-or-nothing extra credentials - Require default keyId when Apple authentication is enabled - Fix lodash merge issue by replacing apple config wholesale on save - Add ScrollArea to StrategySettings dialog for overflow handling - Trim id and clientId fields on form submission - Support inheriting default credentials or providing second Apple team credentials Matches backend contract from Conduit #1547
…rrors on row - Normalize whitespace-only privateKey/teamId/keyId/redirect_uri to empty string on submit to prevent backend treating ' ' as set (which would cause mixed-cred 400) - Interior PEM whitespace in privateKey is preserved (only trim-empty normalization) - Replace .refine with .superRefine for unique nickname validation to show errors on specific duplicate row's id field instead of at clients[] array level - Operator now sees 'This nickname is already used' next to the offending Nickname field Addresses review feedback from Dwight
…ntial badges Steal UI patterns from #296 (kkopanidis feat/apple-multi-oauth-clients): - Collapsible default-client and extra-client rows (collapsed by default) - Credential completeness badge (Not configured / Incomplete / Credentials complete) - Compact header with title + subtitle (nickname / Apple app id) - Add/remove extra client in that layout - Grid layout for responsive form fields Keep all fixes from #311: - Wholesale replace of apple on save (no lodash-merge of clients[]) - Inherit vs second team validation (all three creds or none) - Unique trimmed nickname with errors on row - Whitespace-only extra creds/redirect_uri → '' on submit - Enabling Apple requires default clientId + privateKey + teamId + keyId - Plain-language copy: 'nickname', 'Apple app ID', 'leave empty to reuse the default key' - Extra creds stay optional in type - Do NOT relabel extra id as 'Client ID (oauthClientId)' - keep the plain language No changes to Microsoft or generic OAuth forms.
…th errors 1. Extra-client credential badge now ONLY counts the three creds (teamId, keyId, privateKey): - 0 filled = 'Reuses default' (inherits default credentials) - 3 filled = 'Second team' (has its own credentials) - 1-2 filled = 'Incomplete' (mixed credentials, blocked by validation) Do not include clientId/id/name in extra-client badge count since clientId is always required. Default client badge still uses all four fields. 2. After validation failure, auto-open collapsible sections that contain errors: - Default client section opens if it has validation errors - Extra client rows with errors (nickname/mixed creds) open automatically - Prevents hiding validation errors inside collapsed sections - Uses controlled Collapsible state with React state + useEffect Keep all #311 fixes: wholesale apple replace, inherit/mixed/unique/keyId validation, whitespace normalize.
Align default Apple clientId label to Apple app ID, scope the wide dialog to Apple only, and match Forgot password redirect URI label size to Local switches.
ChrisPdgn
force-pushed
the
cursor/apple-extra-oauth-clients-5ded
branch
from
September 10, 2026 12:54
3c9ba18 to
98931f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds support for configuring extra Apple OAuth clients in the Conduit Admin UI, matching the backend contract from Conduit #1547.
Also replaces #296
What Operators Can Do
UI Design
Polished layout inspired by #296:
Plain-Language Copy (Unchanged)
Key Changes
Type Updates
AppleExtraClienttype with fields:id,clientId,name,redirect_uri,privateKey,teamId,keyIdAppleConfigto include optionalclients[]arrayCredentialFieldstype for badge calculationUI Implementation
useFieldArrayValidation
idfield" "as set)Bug Fixes
apple.clients[]by array index, causing deleted rows to reappear and fields from different clients to mix. Now the entireappleconfig is replaced wholesale on save when using the Strategy Settings dialog.apple.clients.UX Details
Backend Contract
This implementation matches the backend contract from Conduit #1547:
clientId,privateKey,teamId,keyId,redirect_uri,enabled,accountLinkingapple.clients[]withid(nickname),clientId, optionalname,redirect_uri, and optional credential overrideredirect_urior credentials = inherit from defaultPATCH /config/authenticationwith{ config: { ...full authentication config } }Testing
Tested scenarios:
Out of Scope
oauthClientId(consumer-side usage)Notes for Reviewers