3 ms·
What SDK are you using? That sound like its (able of) doing a lot more than just token validation. As a comparison: looking at googles docs for "Google Identit
by maverwa 5y ago
What SDK are you using? That sound like its (able of) doing a lot more than just token validation.
As a comparison: looking at googles docs for "Google Identity Toolkit" (which is abandoned, thanks google!), the used google/identity-toolkit-php-client[1] composer package installs ~196 files with ~212k LoC PHP source, totaling at around 7MB.
Still a lot for validating a token, but most of that is from the google/apiclient library, which seems to be a generic client for google APIs, and the google/identity-toolkit-php-client just adds 10 files and 729 lines of php code, which seems pretty reasonable.
[edit]:
Looking at the more recent (and alive) google/auth[2] seems to add around 200 files with 12k LoC PHP, including the guzzlehttp client, some firebase client and some psr API stubs.
[1]: https://packagist.org/packages/google/identity-toolkit-php-client https://packagist.org/packages/google/identity-toolkit-php-c...
[2]: https://packagist.org/packages/google/auth https://packagist.org/packages/google/auth
- yashg 5y agoI am using this https://github.com/googleapis/google-api-php-client https://github.com/googleapis/google-api-php-client Recommended by Google https://developers.google.com/identity/gsi/web/guides/verify-google-id-token https://developers.google.com/identity/gsi/web/guides/verify...
- maverwa 5y agoOh wow, yeah. Looks like the culprit here is google/apiclient-services which provides a fat client for EVERY google API [1] In classic google monorepo culture, thats one package for all the things. A great example on how not to structure your SDK. So yeah, you are right. Thats a lot of code if you only use like 0.25% of it. [1]: https://github.com/googleapis/google-api-php-client-services/tree/master/src https://github.com/googleapis/google-api-php-client-services...
- yashg 5y agoI liked what jQuery UI does. It provides a web based configurator to choose what components you want to use and then you download a custom file with only those components. Really useful Avoid wasteful loading of code you are never going to use.