Search code examples
google-signingoogle-api-js-client

new Google Identity Services JavaScript library - how can i make authorised requests to google api?


according to google:

The older Google Sign-In platform library: apis.google.com/js/platform.js, and Google APIs client library for JavaScript: gapi.client, are no longer required for user authentication and authorization. They have been replaced by a single new Google Identity Services JavaScript library: accounts.google.com/gsi/client.

with the older library you could both authenticate users to your site and you could make authorized requests to google api such as calendar.

there is no information in the docs, as far as i can see, reagrding how to make authenticated requests to google api's such as calendar.

is the new api only replacing the old for apps that only do sign in. am i missing a way of using the new api to make authenicated requests.


Solution

  • FYI: On Feb/15/2022, Google announced the availability of Authorization in Google Identify Service SDK:

    https://developers.googleblog.com/2022/02/announcing-authorization-support-for.html

    here is the docs:

    https://developers.google.com/identity/oauth2/web/guides/overview