Skip to content

Commit a5bc0b5

Browse files
committed
Fix duplicate authentication presentations
1 parent 7ae0df8 commit a5bc0b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/WebAuthentication/WebAuthentication.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public struct WebAuthentication {
154154

155155
var isPresented: Bool = false {
156156
didSet {
157+
guard isPresented != oldValue else { return }
157158
if isPresented {
158159
start()
159160
} else {
@@ -261,6 +262,9 @@ public struct WebAuthentication {
261262

262263
var item: Item? {
263264
didSet {
265+
guard item?.id != oldValue?.id else {
266+
return
267+
}
264268
switch (oldValue, item) {
265269
case (.none, .none):
266270
break

0 commit comments

Comments
 (0)