snapauthapp / sdk-swift

Swift SDK for SnapAuth (all Apple platforms)
https://www.snapauth.app
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Unify async-delegate continuations and fix autofill-to-modal data race #29

Closed Firehed closed 2 months ago

Firehed commented 2 months ago

Instead of maintaining a bunch of internal state and logic to figure out whether a registration, modal authentication, or autofill authentication is currently being processed, this collapses the logic significantly to have a single continuation that manages both modal paths. Now at the start of all public calls, reset() is triggered which should reliably reset (and clear out) all of the continuation stuff and

Autofill is a little finicky still, but upon further testing on different branches, it looks like some of the assumptions made in the initial design (with a delegate class for clients) were incorrect and it should be possible to move that to async as well. That'll be addressed separately; for the moment the existing API will continue to work,

Fixes #25