Skip to content

Commit

Permalink
Removed unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Sosna committed Sep 9, 2024
1 parent ce1b87a commit 6b18d73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
7 changes: 1 addition & 6 deletions Auth0/CredentialsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,7 @@ public struct CredentialsManager {

private func retrieveCredentials() -> Credentials? {
guard let data = self.storage.getEntry(forKey: self.storeKey) else { return nil }
do {
return try JSONDecoder().decode(Credentials.self, from: data)
} catch {
print(error.localizedDescription)
return nil
}
return try? JSONDecoder().decode(Credentials.self, from: data)
}

// swiftlint:disable:next function_body_length
Expand Down
9 changes: 1 addition & 8 deletions Auth0/CredentialsStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ extension SimpleKeychain: CredentialsStorage {
/// - Parameter key: The key to get from the Keychain.
/// - Returns: The stored data.
public func getEntry(forKey key: String) -> Data? {
do {
return try self.data(forKey: key)
} catch {
print(error.localizedDescription
)
return nil
}

return try? self.data(forKey: key)
}

/// Sets a storage entry.
Expand Down

0 comments on commit 6b18d73

Please sign in to comment.