File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -670,6 +670,20 @@ extension OneSignalUserManagerImpl {
670670 jwtConfig. isRequired = required
671671 }
672672
673+ /**
674+ This is called when remote params does not return the property `IOS_JWT_REQUIRED`.
675+ It is likely this feature is not enabled for the app, so we will assume it is off.
676+ However, don't overwrite the value if this has already been set.
677+ */
678+ @objc
679+ public func remoteParamsReturnedUnknownRequiresUserAuth( ) {
680+ guard jwtConfig. isRequired == nil else {
681+ return
682+ }
683+ OneSignalLog . onesignalLog ( . LL_DEBUG, message: " remoteParamsReturnedUnknownRequiresUserAuth called " )
684+ jwtConfig. isRequired = false
685+ }
686+
673687 @objc
674688 public func subscribeToJwtConfig( _ listener: OSUserJwtConfigListener , key: String ) {
675689 jwtConfig. subscribe ( listener, key: key)
Original file line number Diff line number Diff line change @@ -643,6 +643,9 @@ + (void)downloadIOSParamsWithAppId:(NSString *)appId {
643643 [OneSignalCoreImpl.sharedClient executeRequest: [OSRequestGetIosParams withUserId: userId appId: appId] onSuccess: ^(NSDictionary *result) {
644644 if (result[IOS_JWT_REQUIRED ]) {
645645 OneSignalUserManagerImpl.sharedInstance .requiresUserAuth = [result[IOS_JWT_REQUIRED ] boolValue ];
646+ } else {
647+ // Remote params did not return IOS_JWT_REQUIRED
648+ [OneSignalUserManagerImpl.sharedInstance remoteParamsReturnedUnknownRequiresUserAuth ];
646649 }
647650
648651 if (result[IOS_USES_PROVISIONAL_AUTHORIZATION ] != (id )[NSNull null ]) {
You can’t perform that action at this time.
0 commit comments