Skip to content

Commit 3b7681a

Browse files
authored
documents phone auth with reference docs (#66)
Adds error documentation pertaining to phone auth to signInAndRetrieveDataWithCredential:completion: method
1 parent 0de31ac commit 3b7681a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Firebase/Auth/Source/FIRAuth.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,20 @@ FIR_SWIFT_NAME(Auth)
355355
</li>
356356
<li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
357357
</li>
358+
<li>@c FIRAuthErrorCodeMissingVerificationID - Indicates that the phone auth credential was
359+
created with an empty verification ID.
360+
</li>
361+
<li>@c FIRAuthErrorCodeMissingVerificationCode - Indicates that the phone auth credential
362+
was created with an empty verification code.
363+
</li>
364+
<li>@c FIRAuthErrorCodeInvalidVerificationCode - Indicates that the phone auth credential
365+
was created with an invalid verification Code.
366+
</li>
367+
<li>@c FIRAuthErrorCodeInvalidVerificationID - Indicates that the phone auth credential was
368+
created with an invalid verification ID.
369+
</li>
370+
<li>@c FIRAuthErrorCodeSessionExpired - Indicates that the SMS code has expired.
371+
</li>
358372
</ul>
359373
360374
@remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.

Firebase/Auth/Source/FIRAuth.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
524524
isReauthentication:(BOOL)isReauthentication
525525
callback:(nullable FIRAuthDataResultCallback)callback {
526526
if ([credential isKindOfClass:[FIREmailPasswordAuthCredential class]]) {
527-
// Special case for email/password credentials:
527+
// Special case for email/password credentials
528528
FIREmailPasswordAuthCredential *emailPasswordCredential =
529529
(FIREmailPasswordAuthCredential *)credential;
530530
[self signInWithEmail:emailPasswordCredential.email
@@ -541,7 +541,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
541541

542542
#if TARGET_OS_IOS
543543
if ([credential isKindOfClass:[FIRPhoneAuthCredential class]]) {
544-
// Special case for phone auth credential
544+
// Special case for phone auth credentials
545545
FIRPhoneAuthCredential *phoneCredential = (FIRPhoneAuthCredential *)credential;
546546
[self signInWithPhoneCredential:phoneCredential callback:^(FIRUser *_Nullable user,
547547
NSError *_Nullable error) {

0 commit comments

Comments
 (0)