Skip to content

Auth I/O '23 - update other SDK iTests to use new API #1268

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 4 commits into from
Apr 14, 2023

Conversation

DellaBitta
Copy link
Contributor

Description

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

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().


Testing

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

Integration Test Run


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.

@DellaBitta DellaBitta marked this pull request as ready for review April 13, 2023 18:57
@DellaBitta DellaBitta requested a review from jonsimantov April 13, 2023 18:57
@DellaBitta DellaBitta merged commit 4351bcd into feature/auth_googleio_23 Apr 14, 2023
@DellaBitta DellaBitta deleted the feature/auth_io_sdk_itests branch April 14, 2023 00:10
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Apr 14, 2023
@github-actions
Copy link

github-actions bot commented Apr 14, 2023

❌  Integration test FAILED

Requested by @DellaBitta on commit 4351bcd
Last updated: Thu Apr 13 19:39 PDT 2023
View integration test log & download artifacts

Failures Configs
storage [TEST] [ERROR] [Windows] [x64] [openssl]

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Apr 14, 2023
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Apr 14, 2023
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 May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants