Skip to content

Commit 552890b

Browse files
nan-liclaude
andcommitted
fix: turn Identity Verification off when remote params omit jwt_required
A missing jwt_required field previously set the flag off only when it was still unknown, so an app that had Identity Verification on stayed on after it was disabled remotely. Treat a missing field as off unconditionally so the on->off transition is actually detected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7699bbd commit 552890b

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OneSignalUserManagerImpl.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -699,15 +699,12 @@ extension OneSignalUserManagerImpl {
699699
}
700700

701701
/**
702-
This is called when remote params does not return the property `IOS_JWT_REQUIRED`.
703-
It is likely this feature is not enabled for the app, so we will assume it is off.
704-
However, don't overwrite the value if this has already been set.
702+
This is called when remote params does not return the property `IOS_JWT_REQUIRED`. A missing value means Identity Verification
703+
is off for this app, so we set it to off unconditionally — including when it was previously on. The `requiresUserAuth` didSet only
704+
fires listeners when the value actually changes, so re-confirming an existing off value is a no-op.
705705
*/
706706
@objc
707707
public func remoteParamsReturnedUnknownRequiresUserAuth() {
708-
guard jwtConfig.isRequired == nil else {
709-
return
710-
}
711708
OneSignalLog.onesignalLog(.LL_DEBUG, message: "remoteParamsReturnedUnknownRequiresUserAuth called")
712709
jwtConfig.isRequired = false
713710
}

0 commit comments

Comments
 (0)