Skip to content
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

BREAKING CHANGE: Deprecating old APIs in Auth #699

Merged
merged 3 commits into from
May 4, 2023

Conversation

chkuang-g
Copy link
Contributor

Description

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

This change includes:

  • Remove PhoneAuthProvider.MaxTimeoutMs
  • Wire the following function to new C++ impl
    • Firebase.Auth.FirebaseAuth.CurrentUser
    • Firebase.Auth.FirebaseUser.ProviderData
  • Deprecated the following function
    • FirebaseUser.LinkAndRetrieveDataWithCredentialAsync_DEPRECATED()
    • FirebaseUser.LinkWithCredentialAsync_DEPRECATED()
    • FirebaseUser.ReauthenticateAndRetrieveDataAsync_DEPRECATED()
    • FirebaseUser.UnlinkAsync_DEPRECATED()
    • FirebaseUser.UpdatePhoneNumberCredentialAsync_DEPRECATED()
    • PhoneAuthProvider.VerificationCompleted_DEPRECATED
    • PhoneAuthProvider.VerifyPhoneNumber()
    • PhoneAuthProvider.GetCredential_DEPRECATED()
    • Firebase.Auth.FirebaseAuth.SignInWithCustomTokenAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.SignInWithCredentialAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.SignInAndRetrieveDataWithCredentialAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.SignInAnonymouslyAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.SignInWithEmailAndPasswordAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.CreateUserWithEmailAndPasswordAsync_DEPRECATED
    • Firebase.Auth.FirebaseAuth.SignInWithProviderAsync_DEPRECATED
    • Firebase.Auth.FirebaseUser.ReauthenticateWithProviderAsync_DEPRECATED
    • Firebase.Auth.FirebaseUser.LinkWithProviderAsync_DEPRECATED
  • Added C# impl for new PhoneAuthOptions class
  • Placeholder impl for PhoneAuthListenerImpl.OnVerificationCompleted(PhoneAuthCredential)

Testing

Describe how you've tested these changes.

Build: https://github.com/firebase/firebase-unity-sdk/actions/runs/4879946559
Test: https://github.com/firebase/firebase-unity-sdk/actions/runs/4880313451


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.

chkuang-g added 3 commits May 2, 2023 18:26
…ror (#680)

Initial change to make sure Unity SDK can compile against C++ Auth feature branch.

Integration test is expected to be broken since it is pointing to C++ main and Unity integration test is not update.

This change includes:
- Update SWIG postprocess to rename deprecated functions which returns a `Task`
- Remove `PhoneAuthProvider.MaxTimeoutMs`
- Wire the following function to new C++ impl
  - `Firebase.Auth.FirebaseAuth.CurrentUser`
  - `Firebase.Auth.FirebaseUser.ProviderData`
- Deprecated the following function
  - Firebase.Auth.FirebaseAuth.SignInWithCustomTokenAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.SignInWithCredentialAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.SignInAndRetrieveDataWithCredentialAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.SignInAnonymouslyAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.SignInWithEmailAndPasswordAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.CreateUserWithEmailAndPasswordAsync_DEPRECATED
  - Firebase.Auth.FirebaseAuth.SignInWithProviderAsync_DEPRECATED
  - Firebase.Auth.FirebaseUser.ReauthenticateWithProviderAsync_DEPRECATED
  - Firebase.Auth.FirebaseUser.LinkWithProviderAsync_DEPRECATED
- Added C# impl for new `PhoneAuthOptions` class
- Placeholder impl for `PhoneAuthListenerImpl.OnVerificationCompleted(PhoneAuthCredential)`
Rename and deprecated the following methods
- `FirebaseUser.LinkAndRetrieveDataWithCredentialAsync_DEPRECATED()`
- `FirebaseUser.LinkWithCredentialAsync_DEPRECATED()`
- `FirebaseUser.ReauthenticateAndRetrieveDataAsync_DEPRECATED()`
- `FirebaseUser.UnlinkAsync_DEPRECATED()`
- `FirebaseUser.UpdatePhoneNumberCredentialAsync_DEPRECATED()`
- `PhoneAuthProvider.VerificationCompleted_DEPRECATED`
- `PhoneAuthProvider.VerifyPhoneNumber()`
- `PhoneAuthProvider.GetCredential_DEPRECATED()`
Since C++ API changed to return `User` as a value, C# API will always
created one object pointing to different CPtr while they are all
referencing the same user.
This change added `Firebase.IsValid` and also use comparison operator
when updating `FirebaseAuth.currentUser`.
@chkuang-g chkuang-g requested review from cynthiajoan and a-maurice May 4, 2023 18:29
@chkuang-g chkuang-g changed the title Deprecating old APIs in Auth BREAKING CHANGE: Deprecating old APIs in Auth May 4, 2023
@chkuang-g chkuang-g merged commit fdb205d into main May 4, 2023
@chkuang-g chkuang-g deleted the feature/auth_unity_googleio_23 branch May 4, 2023 18:56
@firebase firebase locked and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants