The official Snapchat™ client requires Google Play Services in order to request AuthTokens, as well as device Attestations in order to login to Snapchat™
With Casper, the package name is ‘io.casper.android’, when you use the Google Play Services flow to gain Tokens and a Device Attestation, they are linked to the package name that requested them.
When we send these to the Snaphat™ server, it will check to make sure it was the official Snapchat™ client which requested them.
If Casper uses the proper OAuth flow with the Google Play Services (which uses the default Google account on the device), then the package name will not be ‘com.snapchat.android’ and you will not be able to login. (Because the Snapchat™ API will reject the Tokens and Attestation)
When you provide credentials to a dummy Google account to Casper, instead of using the Google Play Services flow, Casper will make the Google API requests itself.
When doing it like so, it’s possible to fake the application package name, and application certificates used in the request.
So, Casper makes the AuthToken and Attestation requests just as if it were the official Snapchat™ client itself, thus allowing you to login successfully.