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

Initial change for Auth Google/IO changes to just fix the compiler error #680

Conversation

chkuang-g
Copy link
Contributor

Description

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

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)

Testing

Describe how you've tested these changes.

Only build locally using

python scripts/build_scripts/build_zips.py --platform=android --apis=auth

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.

If a function name ends with `_DEPRECATED` and returns a Task,
append `Async_DEPRECATED` to the function name, instead of
`_DEPRECATEDAsync`.
@chkuang-g chkuang-g changed the title Feature/auth googleio 23 compiler error Initial change for Auth Google/IO changes to just fix the compiler error Apr 20, 2023
- 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)`
@chkuang-g chkuang-g force-pushed the feature/auth_googleio_23_compiler_error branch from e1d0fbb to 9949c0c Compare April 20, 2023 20:19
line = regexp.sub(r'\g<1>\g<2>Async\g<3>', line)
if function_name.endswith('_DEPRECATED'):
# Swap the location of 'Async' and '_DEPRECATED'
line = line.replace('_DEPRECATEDAsync', 'Async_DEPRECATED')
Copy link
Contributor

Choose a reason for hiding this comment

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

Ouch. :) Thanks for doing that!

auth/src/swig/auth.i Outdated Show resolved Hide resolved
auth/src/swig/auth.i Outdated Show resolved Hide resolved
auth/src/swig/auth.i Outdated Show resolved Hide resolved
@chkuang-g chkuang-g merged commit 372f864 into feature/auth_unity_googleio_23 Apr 20, 2023
@chkuang-g chkuang-g deleted the feature/auth_googleio_23_compiler_error branch April 20, 2023 23:47
chkuang-g added a commit that referenced this pull request Apr 29, 2023
…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)`
chkuang-g added a commit that referenced this pull request Apr 29, 2023
…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)`
chkuang-g added a commit that referenced this pull request May 3, 2023
…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)`
chkuang-g added a commit that referenced this pull request May 4, 2023
* Initial change for Auth Google/IO changes to just fix the compiler error (#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)`

* Remaining Auth deprecated APIs for Google I/O (#684)

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()`
@firebase firebase locked and limited conversation to collaborators Jun 1, 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