Skip to content

[firebase_auth] Correct method signature for confirmPasswordReset #1780

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

Merged
merged 3 commits into from
Jan 11, 2020
Merged

[firebase_auth] Correct method signature for confirmPasswordReset #1780

merged 3 commits into from
Jan 11, 2020

Conversation

bgetsug
Copy link
Contributor

@bgetsug bgetsug commented Jan 8, 2020

Description

The FirebaseAuthPlatform.confirmPasswordReset method should accept String app as an argument to be consistent with the rest of the interface (and existing implementations, particularly for firebase_auth_web).

cc: @lanmonster, @hterkelsen

Related Issues

#1778

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@collinjackson collinjackson self-requested a review January 8, 2020 18:51
Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should avoid changing the method signature of confirmPasswordReset because it would be a breaking change, and we are trying to avoid breaking changes to platform interfaces where possible. What I'd suggest instead is that we add app as an optional named parameter to confirmPasswordReset.

Future<void> confirmPasswordReset(String oobCode, String newPassword, { String app });

@hterkelsen if you feel otherwise please chime in

@bgetsug
Copy link
Contributor Author

bgetsug commented Jan 8, 2020

I think that we should avoid changing the method signature of confirmPasswordReset because it would be a breaking change, and we are trying to avoid breaking changes to platform interfaces where possible. What I'd suggest instead is that we add app as an optional named parameter to confirmPasswordReset.

@collinjackson I understand where you're coming from from but confirmPasswordReset was only published less than a day ago (#1753), and as far as I can tell, has no active implementations yet. All the other methods on FirebaseAuthPlatform have app as a required argument. At what point do you folks say "this was overlooked and should be corrected"?

@harryterkelsen
Copy link

I agree with @bgetsug. I should have caught this in code review yesterday. Since this hasn't even landed in package:firebase_auth yet (just the platform interface), I think we should correct the mistake before it actually becomes a breaking change.

Copy link

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bgetsug bgetsug mentioned this pull request Jan 8, 2020
13 tasks
@collinjackson collinjackson self-requested a review January 8, 2020 20:45
Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with making an exception here and allowing the breaking change, but I think it should be noted in the changelog.

@collinjackson collinjackson merged commit a007be1 into firebase:master Jan 11, 2020
lanmonster pushed a commit to lanmonster/flutterfire that referenced this pull request Jan 11, 2020
…rebase#1780)

* add 'app' to signature of FirebaseAuthPlatform.confirmPasswordReset

* Update packages/firebase_auth/firebase_auth_platform_interface/CHANGELOG.md

Co-authored-by: Collin Jackson <[email protected]>
@bgetsug bgetsug deleted the confirmPasswordReset_correction branch January 13, 2020 20:26
@firebase firebase locked and limited conversation to collaborators Aug 4, 2020
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.

4 participants