Skip to content

Commit

Permalink
[Docs] Fix DocC warnings in FirebaseAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Nov 5, 2024
1 parent bc41b66 commit 04388b0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
6 changes: 2 additions & 4 deletions FirebaseAuth/Sources/Swift/Auth/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ extension Auth: AuthInterop {

/// Sets the `currentUser` on the receiver to the provided user object.
/// - Parameter user: The user object to be set as the current user of the calling Auth instance.
/// - Parameter completion: Optionally; a block invoked after the user of the calling Auth
/// instance has been updated or an error was encountered.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
open func updateCurrentUser(_ user: User) async throws {
return try await withCheckedThrowingContinuation { continuation in
Expand Down Expand Up @@ -1430,6 +1428,7 @@ extension Auth: AuthInterop {
}

/// Revoke the users token with authorization code.
/// - Parameter authorizationCode: The authorization code used to perform the revocation.
/// - Parameter completion: (Optional) the block invoked when the request to revoke the token is
/// complete, or fails. Invoked asynchronously on the main thread in the future.
@objc open func revokeToken(withAuthorizationCode authorizationCode: String,
Expand All @@ -1450,8 +1449,7 @@ extension Auth: AuthInterop {
}

/// Revoke the users token with authorization code.
/// - Parameter completion: (Optional) the block invoked when the request to revoke the token is
/// complete, or fails. Invoked asynchronously on the main thread in the future.
/// - Parameter authorizationCode: The authorization code used to perform the revocation.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
open func revokeToken(withAuthorizationCode authorizationCode: String) async throws {
return try await withCheckedThrowingContinuation { continuation in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import Foundation
/// Used to obtain an auth credential via a mobile web flow.
/// This method is available on iOS only.
/// - Parameter uiDelegate: An optional UI delegate used to present the mobile web flow.
/// - Parameter completionHandler: Optionally; a block which is invoked asynchronously on the
/// main
/// thread when the mobile web flow is completed.
@available(iOS 13, tvOS 13, macOS 10.15, watchOS 8, *)
@objc(getCredentialWithUIDelegate:completion:)
func credential(with uiDelegate: AuthUIDelegate?) async throws -> AuthCredential
Expand Down
5 changes: 3 additions & 2 deletions FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import Foundation
/// - Parameter providerID: The provider ID of the IDP for which this auth provider instance will
/// be configured.
/// - Parameter auth: The auth instance to be associated with the OAuthProvider instance.
/// - Returns: An instance of OAuthProvider corresponding to the specified provider ID.
public init(providerID: String, auth: Auth = Auth.auth()) {
if auth.requestConfiguration.emulatorHostAndPort == nil {
if providerID == FacebookAuthProvider.id {
Expand Down Expand Up @@ -126,7 +125,6 @@ import Foundation
/// - Parameter providerID: The provider ID of the IDP for which this auth provider instance will
/// be configured.
/// - Parameter auth: The auth instance to be associated with the OAuthProvider instance.
/// - Returns: An instance of OAuthProvider corresponding to the specified provider ID.
public convenience init(providerID: AuthProviderID, auth: Auth = Auth.auth()) {
self.init(providerID: providerID.rawValue, auth: auth)
}
Expand Down Expand Up @@ -339,6 +337,9 @@ import Foundation
/// Used to obtain an auth credential via a mobile web flow.
/// This method is available on iOS only.
/// - Parameter uiDelegate: An optional UI delegate used to present the mobile web flow.
/// - Parameter completionHandler: Optionally; a block which is invoked asynchronously on the
/// main
/// thread when the mobile web flow is completed.
@available(iOS 13, tvOS 13, macOS 10.15, watchOS 8, *)
@objc(getCredentialWithUIDelegate:completion:)
@MainActor
Expand Down
4 changes: 3 additions & 1 deletion FirebaseAuth/Sources/Swift/MultiFactor/MultiFactor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ import Foundation
/// - Parameter assertion: The `MultiFactorAssertion`.
/// - Parameter displayName: An optional display name associated with the multi factor to
/// enroll.
/// - Parameter completion: The block invoked when the request is complete, or fails.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
open func enroll(with assertion: MultiFactorAssertion, displayName: String?) async throws {
return try await withCheckedThrowingContinuation { continuation in
Expand All @@ -187,6 +186,7 @@ import Foundation
}

/// Unenroll the given multi factor.
/// - Parameter factorInfo: The second factor instance to unenroll.
/// - Parameter completion: The block invoked when the request to send the verification email is
/// complete, or fails.
@objc(unenrollWithInfo:completion:)
Expand All @@ -202,6 +202,8 @@ import Foundation
}

/// Unenroll the given multi factor.
/// - Parameter factorUID: The unique identifier corresponding to the
/// second factor being unenrolled.
/// - Parameter completion: The block invoked when the request to send the verification email is
/// complete, or fails.
@objc(unenrollWithFactorUID:completion:)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import Foundation
@objc public let auth: Auth

/// A helper function to help users complete sign in with a second factor using a
/// `MultiFactorAssertion` confirming the user successfully completed the second factor
/// challenge.
/// - Parameter assertion: The assertion confirming the user successfully
/// completed the second factor challenge.
/// - Parameter completion: The block invoked when the request is complete, or fails.
@objc(resolveSignInWithAssertion:completion:)
open func resolveSignIn(with assertion: MultiFactorAssertion,
Expand Down Expand Up @@ -90,8 +90,8 @@ import Foundation
}

/// A helper function to help users complete sign in with a second factor using a
/// `MultiFactorAssertion` confirming the user successfully completed the second factor
/// challenge.
/// - Parameter assertion: The assertion confirming the user successfully
/// completed the second factor challenge.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
open func resolveSignIn(with assertion: MultiFactorAssertion) async throws -> AuthDataResult {
return try await withCheckedThrowingContinuation { continuation in
Expand Down
6 changes: 2 additions & 4 deletions FirebaseAuth/Sources/Swift/User/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ extension User: NSSecureCoding {}
/// sensitive operation that requires a recent login from the user. This error indicates
/// the user has not signed in recently enough. To resolve, reauthenticate the user by
/// calling `reauthenticate(with:)`.
/// - Parameter phoneNumberCredential: The new phone number credential corresponding to the
/// - Parameter credential: The new phone number credential corresponding to the
/// phone number to be added to the Firebase account, if a phone number is already linked to the
/// account this new phone number will replace it.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down Expand Up @@ -766,8 +766,6 @@ extension User: NSSecureCoding {}
/// - Parameter uiDelegate: Optionally an instance of a class conforming to the `AuthUIDelegate`
/// protocol used for presenting the web context. If nil, a default `AuthUIDelegate`
/// will be used.
/// - Parameter completion: Optionally; a block which is invoked when the link flow finishes, or
/// is canceled. Invoked asynchronously on the main thread in the future.
/// - Returns: An AuthDataResult.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
@discardableResult
Expand Down Expand Up @@ -1028,7 +1026,7 @@ extension User: NSSecureCoding {}
}

/// Send an email to verify the ownership of the account then update to the new email.
/// - Parameter email: The email to be updated to.
/// - Parameter newEmail: The email to be updated to.
/// - Parameter actionCodeSettings: An `ActionCodeSettings` object containing settings related to
/// handling action codes.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down

0 comments on commit 04388b0

Please sign in to comment.