Skip to content

Commit 03909d3

Browse files
feat: Remove deprecated User::UpdateEmail method
This commit removes the deprecated `User::UpdateEmail` method from the Auth SDK, integration tests, unit tests, and sample code. BREAKING CHANGE: `User::UpdateEmail` has been removed. Use `User::SendEmailVerificationBeforeUpdatingEmail` instead.
1 parent 2ac63e7 commit 03909d3

File tree

5 files changed

+0
-43
lines changed

5 files changed

+0
-43
lines changed

auth/integration_test/src/integration_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,6 @@ TEST_F(FirebaseAuthTest, TestOperationsOnInvalidUser) {
580580
WaitForCompletionOrInvalidStatus(string_future, "GetToken");
581581
EXPECT_NE(string_future.error(), firebase::auth::kAuthErrorNone);
582582

583-
LogDebug("Update Email");
584-
void_future = invalid_user.UpdateEmail(GenerateEmailAddress().c_str());
585-
WaitForCompletionOrInvalidStatus(void_future, "UpdateEmail");
586-
EXPECT_NE(void_future.error(), firebase::auth::kAuthErrorNone);
587-
588583
LogDebug("Update Password");
589584
void_future = invalid_user.UpdatePassword(kTestPassword);
590585
WaitForCompletionOrInvalidStatus(void_future, "UpdatePassword");

auth/samples/src/doc_samples.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,6 @@ void VariousUserManagementChecks(firebase::auth::Auth* auth) {
360360
}
361361
// [END auth_profile_edit_check]
362362
}
363-
{
364-
// [START auth_set_email_check]
365-
firebase::auth::User user = auth->current_user();
366-
if (user.is_valid()) {
367-
user.UpdateEmail("[email protected]")
368-
.OnCompletion(
369-
[](const firebase::Future<void>& completed_future,
370-
void* user_data) {
371-
// We are probably in a different thread right now.
372-
if (completed_future.error() == 0) {
373-
printf("User email address updated.");
374-
}
375-
},
376-
nullptr);
377-
}
378-
// [END auth_set_email_check]
379-
}
380363
{
381364
// [START auth_user_verify_email_check]
382365
firebase::auth::User user = auth->current_user();

auth/src/desktop/rpcs/set_account_info_request.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ SetAccountInfoRequest::SetAccountInfoRequest(::firebase::App& app,
3636
application_data_->returnSecureToken = true;
3737
}
3838

39-
std::unique_ptr<SetAccountInfoRequest>
40-
SetAccountInfoRequest::CreateUpdateEmailRequest(::firebase::App& app,
41-
const char* const api_key,
42-
const char* const email) {
43-
auto request = CreateRequest(app, api_key);
44-
if (email) {
45-
request->application_data_->email = email;
46-
} else {
47-
LogError("No email given");
48-
}
49-
request->UpdatePostFields();
50-
return request;
51-
}
52-
5339
std::unique_ptr<SetAccountInfoRequest>
5440
SetAccountInfoRequest::CreateUpdatePasswordRequest(
5541
::firebase::App& app, const char* const api_key, const char* const password,

auth/src/desktop/rpcs/set_account_info_request.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ namespace auth {
3131

3232
class SetAccountInfoRequest : public AuthRequest {
3333
public:
34-
static std::unique_ptr<SetAccountInfoRequest> CreateUpdateEmailRequest(
35-
::firebase::App& app, const char* api_key, const char* email);
3634
static std::unique_ptr<SetAccountInfoRequest> CreateUpdatePasswordRequest(
3735
::firebase::App& app, const char* api_key, const char* password,
3836
const char* language_code = nullptr);

release_build_files/readme.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,6 @@ code.
678678
### Upcoming Release
679679
- Changes
680680
- Auth: Removed deprecated `User::UpdateEmail` method.
681-
- iOS: Added an option to explicitly specify your app's `AppDelegate` class
682-
name via the `FirebaseAppDelegateClassName` key in `Info.plist`. This
683-
provides a more direct way for Firebase to interact with your specified
684-
AppDelegate. See "Platform Notes > iOS Method Swizzling >
685-
Specifying Your AppDelegate Class Directly (iOS)" for details.
686681

687682
### 12.8.0
688683
- Changes

0 commit comments

Comments
 (0)