This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit dce83ee
thomas
fix(iOS): use ASWebAuthenticationSession instead of WKWebView for login
WKWebView silently fails to complete cross-domain OIDC redirects (e.g.
when Nextcloud delegates authentication to an external IdP like Authentik).
The user authenticates successfully on the IdP side, but WKWebView drops
the callback redirect back to the Nextcloud origin, leaving the login
flow stuck in a polling loop that never resolves.
ASWebAuthenticationSession uses the system browser which properly handles
cross-domain redirects, passkeys, and deep links. Credentials continue
to be obtained via the existing polling mechanism.
macOS retains the WKWebView sheet since ASWebAuthenticationSession
behaves differently on that platform and cross-domain redirects are
less problematic there.
Ref: nextcloud/ios#3996 (same fix applied to the main iOS app)
Made-with: Cursor1 parent 0b3cbdc commit dce83ee
2 files changed
Lines changed: 73 additions & 3 deletions
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
| 227 | + | |
219 | 228 | | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
| |||
290 | 300 | | |
291 | 301 | | |
292 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
293 | 307 | | |
| 308 | + | |
294 | 309 | | |
295 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
296 | 338 | | |
297 | | - | |
| 339 | + | |
298 | 340 | | |
299 | 341 | | |
300 | 342 | | |
301 | | - | |
302 | | - | |
| 343 | + | |
| 344 | + | |
303 | 345 | | |
304 | 346 | | |
305 | 347 | | |
| |||
0 commit comments