Skip to content

Commit 6546daf

Browse files
nan-licursoragent
andcommitted
fix: [PR4] mark JWT bearer updates as local-only
Use preventServerUpdate so the token never becomes an identity delta by accident of the alias cast failing. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 21a271b commit 6546daf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModel.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class OSIdentityModel: OSModel {
5858
return true
5959
}
6060
if changed {
61-
self.set(property: OS_JWT_BEARER_TOKEN, newValue: newValue)
61+
self.set(property: OS_JWT_BEARER_TOKEN, newValue: newValue, preventServerUpdate: true)
6262
}
6363
}
6464
}
@@ -83,7 +83,7 @@ class OSIdentityModel: OSModel {
8383
return true
8484
}
8585
if changed {
86-
self.set(property: OS_JWT_BEARER_TOKEN, newValue: OS_JWT_TOKEN_INVALID)
86+
self.set(property: OS_JWT_BEARER_TOKEN, newValue: OS_JWT_TOKEN_INVALID, preventServerUpdate: true)
8787
}
8888
return changed
8989
}

0 commit comments

Comments
 (0)