I do have a question which buggs me. Whenever you use a Google API like Firebase Database you tell the Endpoint upon creation the package name of your app that is allowed to use it and also the Fingerprint of the certificate that you use to sign the app. Now when you try to use the API from another App (different package name) or changed the signing certificate (e.g. switched from debug to release) Google will reject the call.
This made me think. How does Google know the signing certificates fingerprint at runtime?
Can we use the same mechanism to secure a custom API Endpoint by checking the fingerprint? Getting the package name is easy and nothing to rely on, but I'm interested in the certificate fingerprint.
My goal is to authenticate requests on the server by something other than a hash of the parameters + salt and potentially a timestamp.