Skip to content

Conversation

@chkuang-g
Copy link
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

Add comparison operator for Auth::User


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

GHA


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.
@chkuang-g chkuang-g requested a review from DellaBitta May 2, 2023 22:40
@chkuang-g chkuang-g requested a review from jonsimantov May 2, 2023 23:21
Copy link
Contributor

@jonsimantov jonsimantov left a comment

Choose a reason for hiding this comment

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

Approved with one nit.


/// Comparison operator.
bool operator==(const User&) const;
bool operator!=(const User&) const;
Copy link
Contributor

@jonsimantov jonsimantov May 2, 2023

Choose a reason for hiding this comment

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

Please fix.

@jonsimantov jonsimantov merged commit 1521a08 into feature/auth_googleio_23 May 3, 2023
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label May 3, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

⏳  Integration test in progress...

Requested by @jonsimantov on commit 1521a08
Last updated: Tue May 2 17:06 PDT 2023
View integration test log & download artifacts

@chkuang-g chkuang-g deleted the feature/auth_compare_user branch May 3, 2023 00:10
jonsimantov added a commit that referenced this pull request May 3, 2023
* initial Auth deprecations * all three platforms build * FirebaseAuth.java and auth_test.cc fixes * format * bundle identifer * removed explicit from CurrentUserBlockListener constructor * added tests, desktop impl, desktop passes * iOS builds and tests pass * android builds and passes tests * [Auth] PhoneAuthCredential support (#1253) Add a new `PhoneAuthCredential` and return it from a new `PhoneAuthProvider::GetCredential` method. Update the `OnVerificationCompleted` method for Phone Auth to push `PhoneAuthCredential` objects to the application. This new PhoneAuthCredential will be used in other new API methods that will introduced later. For now it returns a `sms_code` string on Android platforms. * [Auth] PhoneAuthOptions struct for VerifyPhoneNumber (#1257) Add a new `PhoneAuthProvider::VerifyPhoneNumber` method that takes a `PhoneAuthOptions` structure. For the C++ implementation on Android, update the current `VerifyPhoneNumber` method to call into the new offering. The older Android SDK `VerifyPhoneNumber` method is deprecated and will probably be removed from the Android SDK at Google I/O, so let's fix this before it becomes a problem. * Add new Auth and User methods to replace the deprecated ones (#1264) Adds the methods to replace those that were deprecated in the Auth and User classes. Duplicated every Integration Test so that there's one test for the deprecated API and one test for the new API. **Note:** `User::LinkAndRetreiveveDataWithCredential` has been removed as it has the same functionality as the new `User::LinkWithCredential`. The major changes of this PR are in four different areas: 1. The addition of tests to `integration_test.cc`. 2. The addition of new methods in the User and Auth implementation. 3. The plaform specific functions that close Futures on callbacks. Functions that faciliate `Future<SignInResult>` and `Future<User*>` completions, marshalling native data into those two return types have been two new compatriot versions for `Future<AuthResult>` and `Future<User>` return types. 4. The internal experimental implementation of FederatedAuth for desktop calls into the user's application to facilitate a auth. The class `FederatedAuthProvider` has been expanded with callbacks that support `AuthResult` objects in addition to the deprecated `SignInResult` objects. Fixes b/138788092. * Auth I/O '23 - update other SDK iTests to use new API (#1268) Numerous product SDKs have iTests which interact with Auth. In a previous feature branch change these tests were changed to use `Future<User*> Auth::current_user_DEPRECATED()`, for instance, as the new Auth API wasn't yet written. This PR updates the tests to use the new APIs, such as `Future<AuthResult> Auth::current_user()`. * Default no-op for deprecated virtual function (#1275) `Listener::OnVerificationCompleted(Credential)` is going to be deprecated and should not be required to implement in the derived class. * Fix Doxygen warnings. * Additional docs fixes. * Fix lint warning. * Added readme note about deprecated methods. * Remove "_DEPRECATED" from LinkAndRetrieveDataWithCredential (#1290) * Remove "_DEPRECATED" from LinkAndRetrieveDataWithCredential No need a DEPRECATED suffix since there's no conflict in a new overloaded version of the method. * Fix kUserFn_LinkAndRetrieveDataWithCredential * Format files. --------- Co-authored-by: Jon Simantov <jsimantov@gmail.com> * Auth Google I/0 23 - Update doc examples to use new API (#1271) Update auth user doc examples to use the new Auth API. * Add comparison operator for Auth::User (#1301) * Add comparison operator for Auth::User * Change to use is_valid() * Add tests * format_code * Add != operator * add comments * Add documentation * update TODO * format code --------- Co-authored-by: Jon Simantov <jsimantov@google.com> --------- Co-authored-by: chkuang-g <31869252+chkuang-g@users.noreply.github.com> Co-authored-by: Jon Simantov <jsimantov@google.com> Co-authored-by: Jon Simantov <jsimantov@gmail.com>
@firebase firebase locked and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tests: in-progress This PR's integration tests are in progress.

3 participants