FRWebAuthn

public class FRWebAuthn : NSObject

FRWebAuthn is a utility class providing helper methods for listing and deleting WebAuthn keys stored on the device. The provided static methods are: public static func deleteCredentials(by rpId: String) public static func loadAllCredentials(by rpId: String) -> [PublicKeyCredentialSource] public static func deleteCredential(with publicKeyCredentialSource: PublicKeyCredentialSource) public static func deleteCredential(with publicKeyCredentialSource: PublicKeyCredentialSource, forceDelete: Bool)

  • Deletes stored credentials for a specific Relying Party Identifier

    Declaration

    Swift

    public static func deleteCredentials(by rpId: String)

    Parameters

    rpId

    Relying Party Identifier

  • Returns all the stored credentials for a specific Relying Party Identifier

    Declaration

    Swift

    public static func loadAllCredentials(by rpId: String) -> [PublicKeyCredentialSource]

    Parameters

    rpId

    Relying Party Identifier

  • Deletes a locally stored WebAuthn Credential (PublicKeyCredentialSource)

    Declaration

    Swift

    @available(*, deprecated, message: "Use deleteCredential(publicKeyCredentialSource:, forceDelete:﹚ instead")
    public static func deleteCredential(with publicKeyCredentialSource: PublicKeyCredentialSource)

    Parameters

    publicKeyCredentialSource

    PublicKeyCredentialSource

  • Delete the provide key from local storage and also remotely from Server if the key is discoverable. By default, if failed to delete from server, local storage will not be deleted, by providing forceDelete to true, it will also delete local keys if server call is failed.

    Throws

    Error during attempt to delete key from server.

    Declaration

    Swift

    public static func deleteCredential(publicKeyCredentialSource: PublicKeyCredentialSource, forceDelete: Bool = false) throws

    Parameters

    publicKeyCredentialSource
    forceDelete

    Defaults to false, true will delete local keys even if the server key removal has failed