fix(auth): Decouple CreateRequest interface from UpdateRequest#3165
Merged
Conversation
Per #1508, `phoneNumber` is not nullable for create requests.
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the CreateRequest interface in both etc/firebase-admin.auth.api.md and src/auth/auth-config.ts so that it no longer extends UpdateRequest. Instead, the interface now explicitly defines its own properties, including disabled, displayName, email, emailVerified, password, phoneNumber, and photoURL. There are no review comments to evaluate, and I have no additional feedback to provide.
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.
By inheriting
UpdateRequest,CreateRequestunintentionally exposes type definitions and optional nullable contracts designed strictly for user update requests. This results in misleading and incompatible type definitions.This PR explicitly defines independent property fields on the
CreateRequestinterface rather than extendingUpdateRequest. This resolves misleading and incompatible type inheritance between user creation and user update workflows by:providerToLinkandprovidersToUnlinkproperty fields fromCreateRequest.nulltype from thedisplayName,photoURL, andphoneNumberproperty fields inCreateRequest.Fixes: #2450, #2929, #3152
Supersedes and closes: #2930