How to stop Google+ Sign-In Button from popping up the message “Welcome back, you've already connected with this app via Google+ Sign-In as …”

前端 未结 4 2292
渐次进展
渐次进展 2020-12-28 18:02

I\'m adding Google+ sign in button to my site using the server-side flow. Here is how I render the sign in button:



        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-28 18:40

    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

     
    

    Have tested it and it works perfectly well.

提交回复
热议问题