Identify an user using apple sign inside unity on mobile and on our web app

We have an unity application using apple Sign in, and we want to build an additional web app that can also keep track of the progress of users.

After people sign in using the unity app we keep track of the ID apple returns for future reference and searches.

To build the webapp we created a service ID and coupled to our only appId, we then created a secret and finally we followed this guide for the setup

The id_token the app outputs shows a sub that is different than the one returned in unity, even though this document here says it should be an unique identifier for our user in our app

What could be going wrong?

Or in case this question is better, how to properly identify an user across a mobile and web environment?