Skip to content

bug(types): scopes is required in firebase.login #671

@lazarljubenovic

Description

@lazarljubenovic

Do you want to request a feature or report a bug? Bug

What is the current behavior?

Using

this.props.firebase.login({
  provider: 'google',
  type: 'popup',
})

results in an error.

TypeScript error: Argument of type '{ provider: "google"; type: "popup"; }'
is not assignable to parameter of type 'Credentials'.
Property 'scopes' is missing in type '{ provider: "google"; type: "popup"; }'
but required in type
'{ provider: "facebook" | "google" | "twitter"; type: "popup" | "redirect"; scopes: string[]; }'.
TS2345

What is the expected behavior?

It should work according to the docs; and it does work when I cast as any.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

Both next and types-overhaul branches seem to be affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions