Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Introduce credentials to firebase_auth #928

Merged
merged 9 commits into from
Nov 27, 2018

Conversation

collinjackson
Copy link
Contributor

@collinjackson collinjackson commented Nov 25, 2018

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)

@collinjackson collinjackson changed the title Revisions to the firebase_auth API Introduce credentials to firebase_auth Nov 26, 2018
Copy link
Contributor

@kroikie kroikie left a 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":
Copy link
Contributor

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

@thevzurd
Copy link

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 ?

@Larry-Liu2016
Copy link

Hi thevzurd, I found through reading the changelog that these examples are actually for version 0.7.0, which is not released yet.

@thevzurd
Copy link

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.

@saltpetre
Copy link

@kroikie @collinjackson Hi can this be published on the package site. Thanks

@thecoffeehog
Copy link

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.

e855428

andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
* Move classes into separate files

* Refactoring to use auth providers

* Merge refactoring

* Update to use revised signInWithCredential API
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
* Move classes into separate files

* Refactoring to use auth providers

* Merge refactoring

* Update to use revised signInWithCredential API
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants