diff options
author | 2017-08-04 09:56:03 -0700 | |
---|---|---|
committer | 2017-08-04 09:56:03 -0700 | |
commit | 13627ec716ed4e7b2cf87ab6d7ffcf8f3f53ae6d (patch) | |
tree | a7b55d4fe27b74c0503a9e1d10727b98590ff53d /Firebase | |
parent | 5430b776ca6fea34d84dab09db39c51b51e551da (diff) |
Adds the missing FIRActionCodeOperationRecoverEmail. (#177)
Also allow in-app action code handling to cancel and leave the code in pasteboard.
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Auth/CHANGELOG.md | 3 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuth.m | 14 | ||||
-rw-r--r-- | Firebase/Auth/Source/Public/FIRAuth.h | 6 |
3 files changed, 21 insertions, 2 deletions
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md index 2043c1a..877ce43 100644 --- a/Firebase/Auth/CHANGELOG.md +++ b/Firebase/Auth/CHANGELOG.md @@ -2,7 +2,8 @@ - Allows the app to handle continue URL natively, e.g., from password reset email. - Allows the app to set language code, e.g., for sending password reset email. -- Fixes an issue that user's phone number does not persist on client. +- Fixes an issue that user's phone number did not persist on client. +- Fixes an issue that recover email action code type was reported as unknown. - Improves app start-up time by moving initialization off from the main thread. - Better reports missing email error when creating a new password user. diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m index ce18cea..c0f6c1f 100644 --- a/Firebase/Auth/Source/FIRAuth.m +++ b/Firebase/Auth/Source/FIRAuth.m @@ -104,10 +104,21 @@ static NSString *const kUserKey = @"%@_firebase_user"; static NSString *const kMissingEmailInvalidParameterExceptionReason = @"The email used to initiate password reset cannot be nil."; +/** @var kPasswordResetRequestType + @brief The action code type value for resetting password in the check action code response. + */ static NSString *const kPasswordResetRequestType = @"PASSWORD_RESET"; +/** @var kVerifyEmailRequestType + @brief The action code type value for verifying email in the check action code response. + */ static NSString *const kVerifyEmailRequestType = @"VERIFY_EMAIL"; +/** @var kRecoverEmailRequestType + @brief The action code type value for recovering email in the check action code response. + */ +static NSString *const kRecoverEmailRequestType = @"RECOVER_EMAIL"; + /** @var kMissingPasswordReason @brief The reason why the @c FIRAuthErrorCodeWeakPassword error is thrown. @remarks This error message will be localized in the future. @@ -174,6 +185,9 @@ static NSMutableDictionary *gKeychainServiceNameForAppName; if ([requestType isEqualToString:kVerifyEmailRequestType]) { return FIRActionCodeOperationVerifyEmail; } + if ([requestType isEqualToString:kRecoverEmailRequestType]) { + return FIRActionCodeOperationRecoverEmail; + } return FIRActionCodeOperationUnknown; } diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h index e120eb2..e3b6b3c 100644 --- a/Firebase/Auth/Source/Public/FIRAuth.h +++ b/Firebase/Auth/Source/Public/FIRAuth.h @@ -186,7 +186,11 @@ typedef NS_ENUM(NSInteger, FIRActionCodeOperation) { FIRActionCodeOperationPasswordReset = 1, /** Action code for verify email operation. */ - FIRActionCodeOperationVerifyEmail = 2 + FIRActionCodeOperationVerifyEmail = 2, + + /** Action code for recover email operation. */ + FIRActionCodeOperationRecoverEmail = 3, + } FIR_SWIFT_NAME(ActionCodeOperation); /** |