Skip to content

Commit b91f255

Browse files
authored
Changed actionCodeOperation types (#14668)
1 parent 2d79f91 commit b91f255

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

FirebaseAuth/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Unreleased
22
- [fixed] Fix a `fatalError` unenrolling from MFA. An invalid user token now throws an
33
`invalidUserToken` error instead of crashing. (#14663)
4-
- [fixed] Fix the parameter from "languageCode" to "lang" in ActionCodeURL (#14664)
4+
- [fixed] Fix the parameter from "languageCode" to "lang" in ActionCodeURL. (#14664)
5+
- [fixed] Fix the parameters for requestType in ActionCodeOperation. (#14665)
56

67
# 11.9.0
78
- [changed] Using reCAPTCHA Enterprise and Firebase Auth requires reCAPTCHA

FirebaseAuth/Sources/Swift/ActionCode/ActionCodeInfo.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ import Foundation
4242
/// - Returns: The corresponding ActionCodeOperation for the supplied request type.
4343
class func actionCodeOperation(forRequestType requestType: String?) -> ActionCodeOperation {
4444
switch requestType {
45-
case "PASSWORD_RESET": return .passwordReset
46-
case "VERIFY_EMAIL": return .verifyEmail
47-
case "RECOVER_EMAIL": return .recoverEmail
48-
case "EMAIL_SIGNIN": return .emailLink
49-
case "VERIFY_AND_CHANGE_EMAIL": return .verifyAndChangeEmail
50-
case "REVERT_SECOND_FACTOR_ADDITION": return .revertSecondFactorAddition
45+
case "resetPassword": return .passwordReset
46+
case "verifyEmail": return .verifyEmail
47+
case "recoverEmail": return .recoverEmail
48+
case "signIn": return .emailLink
49+
case "verifyAndChangeEmail": return .verifyAndChangeEmail
50+
case "revertSecondFactorAddition": return .revertSecondFactorAddition
5151
default: return .unknown
5252
}
5353
}

FirebaseAuth/Tests/Unit/AuthTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ class AuthTests: RPCBaseTests {
538538
*/
539539
func testCheckActionCodeSuccess() throws {
540540
let kNewEmail = "[email protected]"
541-
let verifyEmailRequestType = "VERIFY_EMAIL"
541+
let verifyEmailRequestType = "verifyEmail"
542542
let expectation = self.expectation(description: #function)
543543

544544
// 1. Setup respond block to test and fake send request.

0 commit comments

Comments
 (0)