diff --git a/FirebaseAuth/CHANGELOG.md b/FirebaseAuth/CHANGELOG.md index 795b602922e..53fae00d47a 100644 --- a/FirebaseAuth/CHANGELOG.md +++ b/FirebaseAuth/CHANGELOG.md @@ -1,7 +1,8 @@ # Unreleased - [fixed] Fix a `fatalError` unenrolling from MFA. An invalid user token now throws an `invalidUserToken` error instead of crashing. (#14663) -- [fixed] Fix the parameter from "languageCode" to "lang" in ActionCodeURL (#14664) +- [fixed] Fix the parameter from "languageCode" to "lang" in ActionCodeURL. (#14664) +- [fixed] Fix the parameters for requestType in ActionCodeOperation. (#14665) # 11.9.0 - [changed] Using reCAPTCHA Enterprise and Firebase Auth requires reCAPTCHA diff --git a/FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift b/FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift index ee249699808..3cfa35909f6 100644 --- a/FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift +++ b/FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift @@ -42,12 +42,12 @@ import Foundation /// - Returns: The corresponding ActionCodeOperation for the supplied request type. class func actionCodeOperation(forRequestType requestType: String?) -> ActionCodeOperation { switch requestType { - case "PASSWORD_RESET": return .passwordReset - case "VERIFY_EMAIL": return .verifyEmail - case "RECOVER_EMAIL": return .recoverEmail - case "EMAIL_SIGNIN": return .emailLink - case "VERIFY_AND_CHANGE_EMAIL": return .verifyAndChangeEmail - case "REVERT_SECOND_FACTOR_ADDITION": return .revertSecondFactorAddition + case "resetPassword": return .passwordReset + case "verifyEmail": return .verifyEmail + case "recoverEmail": return .recoverEmail + case "signIn": return .emailLink + case "verifyAndChangeEmail": return .verifyAndChangeEmail + case "revertSecondFactorAddition": return .revertSecondFactorAddition default: return .unknown } } diff --git a/FirebaseAuth/Tests/Unit/AuthTests.swift b/FirebaseAuth/Tests/Unit/AuthTests.swift index fe7be777cc9..dc39e1448cb 100644 --- a/FirebaseAuth/Tests/Unit/AuthTests.swift +++ b/FirebaseAuth/Tests/Unit/AuthTests.swift @@ -538,7 +538,7 @@ class AuthTests: RPCBaseTests { */ func testCheckActionCodeSuccess() throws { let kNewEmail = "newEmail@example.com" - let verifyEmailRequestType = "VERIFY_EMAIL" + let verifyEmailRequestType = "verifyEmail" let expectation = self.expectation(description: #function) // 1. Setup respond block to test and fake send request.