Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh62 committed Jan 31, 2025
1 parent 1d196d5 commit d1b9685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ struct InitiateSignOut: Action {
let data = try await credentialStoreClient?.fetchData(
type: .amplifyCredentials
)
guard case .amplifyCredentials(var credentials) = data else {
guard case .amplifyCredentials(let credentials) = data else {
return signedInData
}

// Update SignedInData based on credential type
switch credentials {
case .userPoolOnly(var updatedSignedInData):
case .userPoolOnly(let updatedSignedInData):
return updatedSignedInData
case .userPoolAndIdentityPool(var updatedSignedInData, _, _):
case .userPoolAndIdentityPool(let updatedSignedInData, _, _):
return updatedSignedInData
case .identityPoolOnly, .identityPoolWithFederation, .noCredentials:
return signedInData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@ class ShowHostedUISignOut: NSObject, Action {
inPrivate: false,
presentationAnchor: signOutEvent.presentationAnchor)
await sendEvent(with: nil, dispatcher: dispatcher, environment: environment)
}
catch HostedUIError.cancelled {
} catch HostedUIError.cancelled {
if signInData.isRefreshTokenExpired == true {
self.logVerbose("\(#fileID) Received user cancelled error, but session is expired and continue signing out.", environment: environment)
await sendEvent(with: nil, dispatcher: dispatcher, environment: environment)
} else {
self.logVerbose("\(#fileID) Received error \(HostedUIError.cancelled)", environment: environment)
await sendEvent(with: HostedUIError.cancelled, dispatcher: dispatcher, environment: environment)
}
}
catch {
} catch {
self.logVerbose("\(#fileID) Received error \(error)", environment: environment)
await sendEvent(with: error, dispatcher: dispatcher, environment: environment)
}
Expand Down

0 comments on commit d1b9685

Please sign in to comment.