-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Introduce credentials to firebase_auth #928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, small suggestion to use constants. Otherwise looks good.
AuthCredential credential; | ||
Map<String, String> data = (Map<String, String>) arguments.get("data"); | ||
switch ((String) arguments.get("provider")) { | ||
case "password": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the constants here instead like we are doing for iOS?
EmailAuthProvider.PROVIDER_ID
One qq - I was trying to implement the firebase authorization and found that AuthCredential and GoogleAuthProvider classes given in the example app are missing in the firebase_auth (package:firebase_auth/firebase_auth.dart) even though I am using the latest version (0.6.6). Am I missing something ? Can you please help ? |
Hi thevzurd, I found through reading the changelog that these examples are actually for version 0.7.0, which is not released yet. |
Thanks Larry. I think I will wait for the new version then. |
@kroikie @collinjackson Hi can this be published on the package site. Thanks |
Hi, @collinjackson it seems the signInWithCredential method is no longer present. Any plans on when the example will be updated. I tried updating one file but it seems all the dependencies need to be upgraded, I don't have the bandwidth to create that PR. |
* Move classes into separate files * Refactoring to use auth providers * Merge refactoring * Update to use revised signInWithCredential API
This reverts commit 3658ccc.
* Move classes into separate files * Refactoring to use auth providers * Merge refactoring * Update to use revised signInWithCredential API
Per conversation with @kroikie and @bparrishMines, this updates the firebase_auth API to introduce the concept of an
AuthCredential
.I'm on the fence about whether to deprecate or remove the old, non-
AuthCredential
version of the API, so let me know if you have opinions. We haven't hit 1.0 yet, so I think it's probably ok to remove, but it will definitely break lots of examples.This PR also moves classes into separate files, because firebase_auth.dart was becoming huge. This makes the API changes harder to review, so I think I might land that first as a separate pull request, but let me know if you have any high-level feedback on the API first (you can see the changes in firebase_auth_test.dart)