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

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.

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

Related

Will Google Identity Service migration impact the authorization URL?

As a developer using Google API, I received the email "Migrate to the new Google Identity Services library". Our application has both Web-based and client solutions. We use Google Sign-In JavaScript library in the Web-based solution, which needs to be migrated. Our client solution calls the GetAuthorizationUrl() method of OAuth2ProviderForApplications in Google API .NET library to get the authorization URL and launch a browser window with the URL.
Is the URL from the .NET library affected by this migration?
I compared the URLs in the windows launched by both Google Sign-In and GIS and those from the .NET library. There seemed to be some difference:
GIS:
https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?...
Google Sign-in Javascript:
https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?...
Google API .NET library:
https://accounts.google.com/o/oauth2/auth?...
#2 and #3 are currently used in our system. When upgraded from Google Sign-in (#2) to GIS (#1), the authorization URL has "v2".
Is the "non v2" version of the authorization URL endpoint (#3) still valid after migration? As we will keep getting this non-v2 URL from the .NET library, it is important to make sure it is still working to avoid our service interruption.

Firebase Custom Auth - What/Where metrics are available?

I use Firebase Custom Auth JWT.
Is there a place (in the Console) or a method (CLI?) by which I can gather the metrics behind the Custom Auth JWT usage?
For instance, I need data like,
How many devices authenticated using the Token?
What timeframews were these device authentication at?
How long were each device session?
There is no such reporting built into Firebase Authentication.
You'd typically fire an Analytics event when signing the user in from the front-end. When you're using a custom authentication token, you could integrate some form of analytics into the minting process, or also use Firebase's Analytics integration with Google Analytics in the front-end when it uses the token.

Login for Google Cloud Endpoints portal page without Google account

I have found the tutorial Using Firebase to authenticate users that explains how to authenticate users with Firebase to access different services.
However I haven't found how to enable Firebase login for the whole Google Cloud Endpoints portal page (like for example https://endpointsportal.ourproject.cloud.goog/).
How can I achieve this?
I think the only identity supported today is GCP meaning Cloud Endpoints Portal doesn't support 3rd party sign in. You can use Firebase to authenticate against the API, but not to log into the portal.

Firebase Analytics to Google Analytics, how to retrieve the Client ID?

we are planning to move from the GA SDK to the Firebase SDK. Within the GA SDK there were options to retrieve the google analytics client ID (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid). This was fundamental since we transferred this value to the WebView (within the app), so that the customers tracking across native/webview was possible.
Does anybody know how to retrieve this client ID within firebase analytics SDK (iOS & Android)?
Thanks!
The short answer is no - the client ID equivalent (app instance ID) is not currently accessible through an SDK API.
The longer answer :
Firebase Analytics currently only supports logging events from native code. And so, the js code in your webview would call native code to log events and you don't need access to the app instance ID.

Can I use Service Account with Google Analytics?

Since few day I am trying to get user profile with my C# using Using OAuth 2.0 for Server to Server Applications with JWT.
For google drive i know that we can use server to server method, but i am not sure for Google Analytics. Can we use it ?
Yes you can!
Service Accounts
Useful for automated/offline/scheduled access to Google Analytics data for your own account. For example, to build a live dashboard of your own Google Analytics data and share it with other users.
There are a few steps you need to follow to configure service accounts to work with Google Analytics:
1. Register a project in the APIs Console.
2. In the Google APIs Console, under the API Access pane, create a client ID with the Application Type set to Service Account.
3. Sign-in to Google Analytics and navigate to the Admin section.
4. Select the account for which you want the application to have access to.
5. Add the email address, from the Client ID created in the APIs Console from step #2, as a user of the selected Google Analytics account.
6. Follow the instructions for Service Accounts to access Google Analytics data.
Source: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtAuthorization
Not yet. See Service Accounts have arrived.
Service accounts are currently supported by the following Google developer services:
Google Cloud Storage
Google Prediction API
Google URL Shortener
Google OAuth 2.0 Authorization Server
Google APIs Console
Google APIs Client Libraries for Python, Java, and PHP
Over time, more Google APIs and client libraries will be supported.
Sign up for Google Developers Blog and the Analytics Blog feeds. They will post when GA is opened to service accounts, if it ever is.

Resources