aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Firebase/Auth/Source/FIRAuth.m13
-rwxr-xr-xscripts/style.sh5
2 files changed, 17 insertions, 1 deletions
diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m
index 387fab7..3b29238 100644
--- a/Firebase/Auth/Source/FIRAuth.m
+++ b/Firebase/Auth/Source/FIRAuth.m
@@ -104,6 +104,14 @@ static NSString *const kUserKey = @"%@_firebase_user";
static NSString *const kMissingEmailInvalidParameterExceptionReason =
@"The email used to initiate password reset cannot be nil.";
+/** @var kHandleCodeInAppFalseExceptionReason
+ @brief The reason for @c invalidParameterException when the handleCodeInApp parameter is false
+ on the ActionCodeSettings object used to send the link for Email-link Authentication.
+ */
+static NSString *const kHandleCodeInAppFalseExceptionReason =
+ @"You must set handleCodeInApp in your ActionCodeSettings to true for Email-link "
+ "Authentication.";
+
/** @var kPasswordResetRequestType
@brief The action code type value for resetting password in the check action code response.
*/
@@ -1108,6 +1116,11 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
[FIRAuthExceptionUtils raiseInvalidParameterExceptionWithReason:
kMissingEmailInvalidParameterExceptionReason];
}
+
+ if (!actionCodeSettings.handleCodeInApp) {
+ [FIRAuthExceptionUtils raiseInvalidParameterExceptionWithReason:
+ kHandleCodeInAppFalseExceptionReason];
+ }
FIRGetOOBConfirmationCodeRequest *request =
[FIRGetOOBConfirmationCodeRequest signInWithEmailLinkRequest:email
actionCodeSettings:actionCodeSettings
diff --git a/scripts/style.sh b/scripts/style.sh
index 317c8c6..4589bfc 100755
--- a/scripts/style.sh
+++ b/scripts/style.sh
@@ -97,6 +97,9 @@ files=$(
find . -type f
fi
) | sed -E -n '
+# find . includes a leading "./" that git does not include
+s%^./%%
+
# Build outputs
\%/Pods/% d
\%^./build/% d
@@ -114,7 +117,7 @@ files=$(
\%/vendor/bundle/% d
# Sources within the tree that are not subject to formatting
-\%^./(Example|Firebase)/(Auth|AuthSamples|Database|Messaging)/% d
+\%^(Example|Firebase)/(Auth|AuthSamples|Database|Messaging)/% d
# Checked-in generated code
\%\.pb(objc|rpc)\.% d