We are using a whitelabel application in which 1 user can use their login to log into the other apps.
Nevertheless (due to a design flaw) we cant detect if the user opening an app is "allowed" to login to that whitelabel app and due to requirements we do not want to block off their login attempt.
The issue we are finding right now is that when a user logs in we register them with our backend (playerId (onesignal), _internaluserID(our own))
Our backend now checks to whom the internaluserID belongs grabs that ApIdd key and sends a push with their playerID.
The flaw we have here is that in the following structure: User A is from company X User B is from company Y User C is from company Z
If user A logs into app X, this will all go okay.
If user A logs into company Y app, they will register themselfs with the backend, and when the backend tried to send a push they will they where the user is from (company Y) and tries to use their player Id (which is registered in the app id of company Y) to send a push. This will go wrong because the user is from company X (which we see in our backend, and use that onesignal appId).
Now to solve this I can send the packageID of our app to determine during the register on the backend, instead of inferring where a user belings based on our default user registration we would be basing it off our pushnotification registration.
I can fetch the packageID via some plugin and send it, but prefferably Id like to receive the appId from onesignal (but I cant find it in the client reference).
The SDK reference states that the app id should not be treated as a secret, therefor I did imagine I could find it somewhere in the client sdk, but I can't. Am I overlooking some other link I can make here, or functionality?