Load the Google 3P Authorization JavaScript Library
Be sure to load the Google 3P Authorization JavaScript library on any page a
user might load OAuth 2.0 codes or tokens. Use the following code snippet:
<script src="https://accounts.google.com/gsi/client" onload="console.log('TODO: add onload function')">
</script>
You can optimize your page's loading speed if you load the script with the
async
and defer
boolean attributes.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["The Google 3P Authorization JavaScript library is required for pages handling OAuth 2.0 codes or tokens and can be loaded using a provided script snippet."],["Loading the script with `async` and `defer` attributes can optimize page loading speed."]]],[]]