Skip to content

Commit

Permalink
Merge pull request #44 from edx/clear-cookies-by-logout
Browse files Browse the repository at this point in the history
fix: clear cookies by logout
  • Loading branch information
rnr authored Jul 26, 2024
2 parents b9c289d + 5fa3024 commit 97ceb35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OpenEdX/Data/AppStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ public class AppStorage: CoreStorage, ProfileStorage, WhatsNewStorage, CourseSto
cookiesDate = nil
user = nil
userProfile = nil
// delete all cookies
if let cookies = HTTPCookieStorage.shared.cookies {
for cookie in cookies {
HTTPCookieStorage.shared.deleteCookie(cookie)
}
}
}

private let KEY_ACCESS_TOKEN = "accessToken"
Expand Down

0 comments on commit 97ceb35

Please sign in to comment.