I trying to solve the problem with E2E testing and Gapi.js. So I created an ENV variable and handle Cypress differently if the environment is testing.
In order to achieve it, I need to get id_token somehow - with Gapi.js help or by the direct API call. What I have is: client_id, client_secret, refresh_token. After POST to https://www.googleapis.com/oauth2/v4/token I get access_token.
How can I get the final token with this data? Or there's any other way to E2E test signup with Google API library?