Because of the known issue described in here (https://developers.google.com/identity/sign-in/web/troubleshooting) I want to update my application to be using the new gsi sign-in that uses less cookies than the previous versions and therefore might have the solution for the mentioned error...
My problem is that there's little to no documentation on how to integrate google picker with the new gsi.
I used to use gapi
for some picker-related code like even loading the library gapi.load('picker', () => {})
. The migration doc says to replace the apis.google.com/js/api.js
with the new gsi url, and a lot of other methods such as googleAuth.signIn
or gapi.client.init
are now to be deprecated by 2023. But then:
- How to load picker without
gapi
available? Orgapi
still needs to be imported but will not contain any sign-in related methods? - How will I pass apiKey and scopes to be able to init googlePicker?
- For methods such as
GoogleAuth.isSignedIn
docs simply states "Remove. A user's current sign-in status on Google is unavailable. Users must be signed-in to Google for consent and sign-in moments." what does that even mean? I need to check if user is signed in in order to not show again the popup every time they want to upload a file from gPicker... - Before, we used to have a
access_token
on the callback of areloadAuthResponse
or asignIn
, now how do we get the token?
Sorry for the question being confusing, I'm very confused with everything. Any input helps, thanks!