Wednesday, October 31, 2012

Google account logout script in Google application

Gmail logout link:
Google account logout link:
JS script:
<script type="text/javascript">"",'','width=600,height=400');
can be used to logout Gmail account.
But I do not like the popup window. I used Google oauth 2.0 to login my Google calendar application. When users login the Google account in popup window,  they may think they login in oauth 2.0 in my Google calendar application.
So I need to hide the logout popup window.  If users need to login, they should go to my login button using oauth 2.0.
After I added popup1.close();  the popup window is closed, but users are not logged out.
<script type="text/javascript">"",'','width=600,height=400');

Using Iframe, finally the following script logged out the Google account without popup new window.
 <script type="text/javascript">

  <iframe id="myIFrame" src="" style='display:none;' >

No comments:

Post a Comment