You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending of its implementation (see code snippets below), using auth-client v0.13.x to create an object and login can ends up being blocked on iOS.
The root cause seems to be the same in PR #618. If async call within a function that calls window.open are performed, Safari seems to interpret the process as a no user interation and therefore blocks the opening of the window. However, in comparison to desktop, on iOS there are no prompt that are displayed and the opening is simply blocked.
What does not work - what works
Following code snippet does not work on iOS - i.e. if bind to a button, the button will have no effect.
Fundamentally the fact that AuthClient.create() does not seem to be an issue according my test but, the migration script that migrates the sessions from local storage to indexeddb seems the root cause. More precisely the async call to indexeddb. While debugging, I noticed that commenting out this part solves the issue as well.
Possible solutions (spontaneous ideas only)
accept limitation and document it
refactor (move) or remove migration script (local storage -> idb) from AuthClient.create (but this won't prevent future issue)
refactor Auth client to avoid async calls during the all flow that should lead to window.open
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Depending of its implementation (see code snippets below), using auth-client
v0.13.x
to create an object and login can ends up being blocked on iOS.The root cause seems to be the same in PR #618. If async call within a function that calls
window.open
are performed, Safari seems to interpret the process as a no user interation and therefore blocks the opening of the window. However, in comparison to desktop, on iOS there are no prompt that are displayed and the opening is simply blocked.What does not work - what works
Following code snippet does not work on iOS - i.e. if bind to a button, the button will have no effect.
On the contrary, following works out.
AuthClient
should be instantiated outside of the function that effectively callslogin
:Root cause of the issue
Fundamentally the fact that
AuthClient.create()
does not seem to be an issue according my test but, the migration script that migrates the sessions from local storage to indexeddb seems the root cause. More precisely the async call to indexeddb. While debugging, I noticed that commenting out this part solves the issue as well.Possible solutions (spontaneous ideas only)
AuthClient.create
(but this won't prevent future issue)window.open
Screenshots
The text was updated successfully, but these errors were encountered: