Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import AWSSDKIdentity
/// store any PII securely, such as by using the Keychain!
///
/// There are many useful packages available for this purpose that
/// you can find using the [Swift Package
/// you can find using the [Swift Package
/// Index](https://swiftpackageindex.com/).
@MainActor
class ViewModel: ObservableObject {
Expand Down Expand Up @@ -193,6 +193,10 @@ class ViewModel: ObservableObject {

// Save the user's data securely to local storage so it's available
// in the future.
//
// IMPORTANT: Any potential Personally Identifiable Information _must_
// be saved securely, such as by using the Keychain or an appropriate
// encrypting technique.

saveUserData()
}
Expand Down Expand Up @@ -234,6 +238,11 @@ class ViewModel: ObservableObject {
/// The bucket names are stored in the view model's `bucketList`
/// property.
func getBucketList() async throws {
// If there's no identity resolver yet, return without doing anything.
guard let identityResolver = identityResolver else {
return
}

// Create an Amazon S3 client configuration that uses the
// credential identity resolver created from the JWT token
// returned by Sign In With Apple.
Expand Down
Loading