Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth.createUser() incorrect types: cannot link provider on account creation #2450

Open
brettwillis opened this issue Feb 7, 2024 · 0 comments

Comments

@brettwillis
Copy link

[REQUIRED] Step 2: Describe your environment

  • Operating System version: N/A
  • Firebase SDK version: 12.0.0
  • Firebase Product: auth
  • Node.js version: N/A
  • NPM version: N/A

[REQUIRED] Step 3: Describe the problem

The types for auth.createUser() (i.e. CreateRequest) inherit from UpdateRequest and therefore inherit types for providerToLink and providersToUnlink. However these parameters are not supported (they are ignored) by the underlying POST /accounts REST API.

export interface CreateRequest extends UpdateRequest {

This is a misrepresentation. Based on the REST API, provider credentials cannot be linked while creating an account, only on a subsequent POST /accounts:update request.

While we're at it the UpdateRequest type does not include custom claims, which is supported by the /accounts:update REST API. See #1882.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants