Skip to content

chore: add warning for identity verification#901

Merged
jennantilla merged 2 commits into
OneSignal:mainfrom
zvikarp:main
Jul 3, 2024
Merged

chore: add warning for identity verification#901
jennantilla merged 2 commits into
OneSignal:mainfrom
zvikarp:main

Conversation

@zvikarp

@zvikarp zvikarp commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Description

One Line Summary

This method is misleading. it is not implemented but the package exposes it. Please remove it or annotate it.

Details

Errors from Android in device logs:

06-12 23:50:13.470 21589 21742 D OneSignal: [DefaultDispatcher-worker-2] HttpClient: Got Response = POST https://api.onesignal.com/apps/<REDUCTED-UUID>/users - FAILED STATUS: 400
06-12 23:50:13.478 21589 21742 W OneSignal: [DefaultDispatcher-worker-2] HttpClient: Got Response = POST - STATUS: 400 - Body: {"errors":[{"title":"uuid: incorrect UUID length 42 in string \"local-<REDUCTED-UUID>\""}]}

Error from iOS in API request:

curl:

curl 'https://api.onesignal.com/apps/<REDUCTED-UUID>/users' \
-X POST \
-H 'Host: api.onesignal.com' \
-H 'Connection: keep-alive' \
-H 'Accept: application/vnd.onesignal.v1+json' \
-H 'SDK-Version: onesignal/ios/050200' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'User-Agent: stern/77 CFNetwork/1496.0.7 Darwin/23.5.0' \
-H 'Content-Type: application/json' \
--cookie '__cf_bm=<REDUCTED-COOKIE>' \
--data-raw '{"refresh_device_metadata":true,"subscriptions":[{"test_type":1, [...] ":"iOSPush"}],"properties":{"timezone_id":"Asia\/Jerusalem","language":"en-IL"},"identity":{}}' \
--proxy http://localhost:9495

response:

{
    "errors": [
        {
            "code": "auth-1",
            "title": "This operation requires 'Authorization' in the HTTP header"
        }
    ]
}

Documentation that mentions it is not implemented: https://documentation.onesignal.com/docs/identity-verification.

Motivation

I spent hours trying to figure out why I'm getting null for onesignal id, no errors in the code logging but different errors from device logs and apis for ios and android didn't help either.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@zvikarp

zvikarp commented Jun 13, 2024

Copy link
Copy Markdown
Contributor Author

this is related to OneSignal/OneSignal-Android-SDK#1913

@zvikarp

zvikarp commented Jun 26, 2024

Copy link
Copy Markdown
Contributor Author

Hi @jennantilla @nan-li or the rest of the team, is there any blocker form merging this?

@nan-li

nan-li commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

Hi @zvikarp thanks for submitting this PR, this method should not have been exposed when the functionality is not yet ready.

@nan-li nan-li self-requested a review June 26, 2024 15:55
@nan-li nan-li self-assigned this Jun 26, 2024
@nan-li nan-li requested review from jennantilla and jkasten2 June 26, 2024 15:56
@jennantilla jennantilla merged commit 354cdfa into OneSignal:main Jul 3, 2024
@jennantilla jennantilla mentioned this pull request Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants