Different userId in apps
When I use the window.ShowpadLib.getUserInfo() method from the SDK, it returns different values in iPad and Web apps.
- in the iPad app it returns something like "104"
- in a Web app and in a local development environment, it returns a hash like "d24b569669e53a765bbf729834459c25".
For some reason we want to store the userId inside a value in appsdb store(instead of getting this as param of entry). And this leads to the problem that sometimes we want to update the value (initially created in iPad) and save it for the user who originally created the entry in the database, but when building a query where the user ID is 104, we get an error that the entry was not found.
My main question is why are the userIDs different on the platforms?
-
Official comment
Thanks for creating this Community post on the Showpad Help Center!
We've received similar questions in the past. Due to historical design decisions, the IDs have two different formats:
- the iOS app uses intentionally readable ID.
- the Web app uses an encrypted value that is converted from the readable ID.
Therefore, without making any additional assumptions about identifiers, apart from them being a unique string of characters identifying an entity, this is currently expected behavior.
There are plans to move away from the mobile API, which also means moving towards encrypted IDs. Our Engineering team is aware but cannot provide a clear estimate of the migration.
The general recommendation right now is to use the user's email (or a hash of the email address) if you need to perform cross-platform matching.
I hope this is clear, and in case you'd have any further questions, feel free to let us know.
Please sign in to leave a comment.
Comments
1 comment