Ephmeral session or how to clear logged in state in WKWebView after logout?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ios, swift
- Lĩnh vực
- authentication, mobile
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện chuỗi login, logout và login lần thứ hai trong WKWebView được mô tả trong issue. Theo dõi Google SignIn signOut() cùng với cách xử lý của WKWebView, HTTPCookieStorage và WKWebsiteDataStore. Hoàn tất khi WKWebView được mở lại không còn hiển thị tài khoản Google đã được lưu trong bộ nhớ đệm trước đó sau khi logout.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I'm wondering how to enable ephemeral session using Google SignIn?
Or how to correctly clear cookies in WKWebView after Google SignIn signOut() method?
To Reproduce
Steps to reproduce the behavior:
- Login using Google SignIn
- Opens WKWebView with no google account signed in (email field is cleared)
- After entering credentials and successful login try to logout
- Login again
- Opens WKWebView with cached google account
Expected behavior
(5) Opens WKWebView with no google account signed in (email field is cleared)
Screenshots
none
Environment
- Device: iPhone Simulator
- OS: iOS 16.2
- Browser: Safari
Additional context
I tried to clear cookies
-
In iOS Settings-Safari-Clear History and Website Data
-
Programmatically:
func clearAllCookies() {
let url = URL(string: "https://accounts.google.com/Logout")!
UIApplication.shared.open(url, options: [:], completion: nil)
if let cookies = HTTPCookieStorage.shared.cookies, cookies.count > 0 {
HTTPCookieStorage.shared.removeCookies(since: .distantPast)
print("All cookies deleted")
}
let dataStore = WKWebsiteDataStore.default()
dataStore.fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in
records.forEach { record in
dataStore.removeData(ofTypes: record.dataTypes, for: [record], completionHandler: {
print("Deleted:", record)
})
}
}
}
None of the above worked.
- Ngôn ngữ chính
- Objective-C
- Star
- 751
- Fork
- 282
- Merge trung bình
- 4 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 11
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/GoogleSignIn-iOS
-
enhancement triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/GoogleSignIn-iOS#621 ·
-
enhancement triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
google/GoogleSignIn-iOS#620 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
google/GoogleSignIn-iOS#440 · 4 bình luận · 2 reaction ·
-
enhancement triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
google/GoogleSignIn-iOS#611 ·
-
Remove Cocoapods Support Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
google/GoogleSignIn-iOS#607 ·
Tất cả issue của google/GoogleSignIn-iOS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
objective-see/LuLu#925 ·
-
macOS下查找brew::ncurse失败 Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
obsproject/obs-studio#13918 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
HigherOrderCO/Bend#842 · 2 bình luận ·