'Hide auto pop up for google login api javascript
I used new Google login using new JavaScript API , I have problem that the when the page reloaded popup shown for login by google for login google accounts, I tried to find a way from the documentation but no result.
Is there a way to prevent the popup from shown?
Solution 1:[1]
Absolutely ! I had the same issue a while back.
Here you can see the structure of the Javascript API. Remove the google.accounts.id.prompt(); line. Below is the complete initialization code for this.
window.onload = function () {
google.accounts.id.initialize({
client_id: 'YOUR_GOOGLE_CLIENT_ID',
callback: handleCredentialResponse
});
// remove this line
google.accounts.id.prompt();
};
For the sign in or sign up with google btn only the accounts.id.initialize is required.
Take a look at this documentation for further customization
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Arky Asmal |

