- Notifications
You must be signed in to change notification settings - Fork 126
Auth Google IO 23 #1255
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
Auth Google IO 23 #1255
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.
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.
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.
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()`.
`Listener::OnVerificationCompleted(Credential)` is going to be deprecated and should not be required to implement in the derived class.
❌ Integration test FAILEDRequested by @jonsimantov on commit 19efa52
Add flaky tests to go/fpl-cpp-flake-tracker |
jonsimantov approved these changes May 1, 2023
Update auth user doc examples to use the new Auth API.
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
Feature branch for Google I/O changes in auth.
Testing
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.