When running my angular (ionic framework) app locally, via a browser all works well but when running via android studio or packaged and pushed into the mobile phone I get a 403.
This is on this line on the index.html:
<script src="https://accounts.google.com/gsi/client" async defer></script>
I am trying to integrate/implement "Sign In With Google" button as per this page: https://developers.google.com/identity/gsi/web/guides/client-library
Any pointers?
Thanks in advance!
2
Answers
I have run into the same issue in REACT..
the solution to my problem was to add /* global google */ above the google.accounts.id .
/* global google */ by putting this line above our code, it will automatically refer to the script inside the index.html file.
React.js example
The error can be removed by setting another user agent. It can be done as follows for Ionic with capacitor.
However the one-tap web library is still not working properly on android. You can search for
to find more information.