mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltStoreCore] Caches Patreon session cookies from in-app browser
Allows us to download apps from locked Patreon posts.
This commit is contained in:
@@ -202,7 +202,7 @@ private extension PatreonViewController
|
||||
|
||||
@IBAction func authenticate(_ sender: UIBarButtonItem)
|
||||
{
|
||||
PatreonAPI.shared.authenticate { (result) in
|
||||
PatreonAPI.shared.authenticate(presentingViewController: self) { (result) in
|
||||
do
|
||||
{
|
||||
let account = try result.get()
|
||||
@@ -212,9 +212,12 @@ private extension PatreonViewController
|
||||
self.update()
|
||||
}
|
||||
}
|
||||
catch ASWebAuthenticationSessionError.canceledLogin
|
||||
catch is CancellationError
|
||||
{
|
||||
// Ignore
|
||||
// Clear in-app browser cache in case they are signed into wrong account.
|
||||
Task<Void, Never>.detached {
|
||||
await PatreonAPI.shared.deleteAuthCookies()
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user