Skip to content

Commit c8a733b

Browse files
committed
add default implementation for deleteAllEntries() with assertion for better DX
1 parent 9d056b7 commit c8a733b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Auth0/CredentialsStorage.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ public protocol CredentialsStorage {
3131

3232
}
3333

34+
extension CredentialsStorage {
35+
36+
/// Default implementation that triggers an assertion failure.
37+
public func deleteAllEntries() throws {
38+
assertionFailure("deleteAllEntries() is not implemented. Implement this method in your custom CredentialsStorage.")
39+
}
40+
41+
}
42+
3443
/// Conformance to ``CredentialsStorage``.
3544
extension SimpleKeychain: CredentialsStorage {
3645

0 commit comments

Comments
 (0)