I'm adding Google+ sign in button to my site using the server-side flow. Here is how I render the sign in button:
<script type="text/javascript">
(function () {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://plus.google.com/js/client:plusone.js?onload=renderGPlus';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
<script type="text/javascript">
function renderGPlus() {
gapi.signin.render('customGPlusBtn', {
'callback': 'gPlusSignInCallback',
'clientid': '<my_client_id>',
'redirecturi': 'postmessage',
'accesstype': 'offline',
'cookiepolicy': 'single_host_origin',
'requestvisibleactions': 'http://schemas.google.com/BuyActivity',
'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
});
}
</script>
When the button is loaded, it immediately checks to see if the user has authorized my application (immediate mode). If the user has previously authorized my application, a notification bar will pop up at the bottom of the page with the message "Welcome back, you've already connected with this app via Google+ Sign-In as .....".
Is there anyway to stop this message from popping up?
Just recently the newly accepted answer on this page for hiding the "Google Sign-in Welcome back pop up"
window.___gcfg = { isSignedOut: true };
does not work again.
AIM: "Hide or Suppress the Google+ Sign In Welcome Back message" on all browsers.
Please if you have been using `
window.___gcfg = { isSignedOut: true };
to suppress the warning. After serious experimentation I discovered this.
I will recommend you use this iframe versions to suppress any kind of Google API pop up window on your web page..
Iframe 1: iframe[src^="https://apis.google.com"] {display: none;}
This Hides all pop up windows from Google APIs on your web page.
Iframe 2: iframe[src^="https://apis.google.com/u/0/_/sharebox"] {display: none;}
This Hides all Google's Interactive Share Dialog pop up on your web page.
Iframe 3: iframe[src^="https://apis.google.com/u/0/_/widget/oauthflow/toast"] {display: none;}
This Hides all "Google's Welcome Back Message" pop up window on your web page.
Iframe 4: iframe[src^="https://apis.google.com/u/0/_/+1/"] {display: none;}
This Hides all "Google's +1 Button" on your web page.
So for this particular question do this in the Head tag of your HTML Page
<style> `iframe[src^="https://apis.google.com/u/0/_/widget/oauthflow/toast` </style>
Have tested it and it works perfectly well.