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

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

Closed
lazarljubenovic opened this issue Apr 5, 2019 · 4 comments
Closed

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

lazarljubenovic opened this issue Apr 5, 2019 · 4 comments
Labels
Projects

Comments

@lazarljubenovic
Copy link

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.

@prescottprue
Copy link
Owner

Made scopes optional and pushed that up to types-overhaul. Is it working as expected now? Planning on getting these changes into a new version soon.

@prescottprue prescottprue changed the title Wrong type for firebase.login bug(types): scopes is required in firebase.login Apr 5, 2019
@lazarljubenovic
Copy link
Author

Yup, it works now, thanks! Not sure when do we close issues (merge to next? merge to v3? merge to master?) so Imma leave that to you. 😅

@prescottprue
Copy link
Owner

I usually close it when it has been released (either merging to master or next).

@prescottprue prescottprue mentioned this issue Apr 5, 2019
3 tasks
prescottprue pushed a commit that referenced this issue Jul 13, 2019
* fix(types): fix spelling of initialize in types
* feat(types): add typing for firebase queries
@prescottprue prescottprue mentioned this issue Jul 13, 2019
3 tasks
prescottprue added a commit that referenced this issue Jul 13, 2019
* feat(types): add types for hooks including `useFirestore`, `useFirebase`, `useFirestoreConnect`, `useFirebaseConnect` - #653
* fix(types): make scopes optional in `credentials` - #671
* fix(docs): remove v2 auth ready docs from v3 docs - #676
* fix(providers): prevent unwanted re-initialization when parent component updates - #725 - @illuminist
* fix(profile): pass `updateProfile` options to action - #701 - @cruzdanilo 
* fix(firebaseConnect): remove `dispatch` from reserved props list - #675, #700
* feat(types): improve types for `withFirestore` and `withFirebase`
* feat(types): added `ExtendedFirebaseInstance` and `ExtendedFirestoreInstance` types
* feat(examples): update typescript example to use hooks
* fix(firestoreConnect): add error for passing of reserved props `firebase` and `firestore` when using `firestoreConnect`
* feat(types): add typing for firebase queries used in `firebaseConnect` and `useFirebaseConnect`
* fix(types): fix spelling of initialize in types
* feat(docs): add api docs pages for context providers and new hooks api 
* feat(docs): automatically find files for doc generation instead of having a constant that needs updating
* feat(core): add uglify and lodash plugins to webpack build to shrink bundle build size
@prescottprue
Copy link
Owner

Released in v3.0.0-alpha.13

@prescottprue prescottprue added this to Done in v3.0.0 via automation Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v3.0.0
  
Done
Development

No branches or pull requests

2 participants