Skip to content

Commit

Permalink
Check Keychain for container instead of User
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Oct 14, 2021
1 parent 78aec79 commit db63447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.0.0...2.0.1)

__Fixes__
- ParseUser should only encode email when User.current?.email is different from current user email ([#256](https://github.com/parse-community/Parse-Swift/pull/256)), thanks to [Corey Baker](https://github.com/cbaker6).
- ParseUser should only encode email when User.current?.email is different from current user email ([#256](https://github.com/parse-community/Parse-Swift/pull/256)), thanks to [Corey Baker](https://github.com/cbaker6).

### 2.0.0
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.11.0...2.0.0)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,8 @@ extension ParseUser {
currentUser.hasSameObjectId(as: mutableSelf) == true {
#if !os(Linux) && !os(Android)
// swiftlint:disable:next line_length
if let currentUserInKeychain: BaseParseUser = try? KeychainStore.shared.get(valueFor: ParseStorage.Keys.currentUser),
currentUserInKeychain.email == mutableSelf.email {
if let currentUserContainerInKeychain: CurrentUserContainer<BaseParseUser> = try? KeychainStore.shared.get(valueFor: ParseStorage.Keys.currentUser),
currentUserContainerInKeychain.currentUser?.email == mutableSelf.email {
mutableSelf.email = nil
}
#else
Expand Down

0 comments on commit db63447

Please sign in to comment.