Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I have asp.net website in c#.
Here i'm using GoogleAccount to login into the website.

I successfully Login/Logout from the website but the logout redirect is as
Logout.aspx
------------
Response.Redirect("https://www.google.com/accounts/Logout");


Now, after the redirect to googleLogout page, i want to redirect it to Login page.

Can anyone please help me.


Thanks
Posted

1 solution

Simply, you cannot. It is up to Google to redirect the user where it wants to redirect the user after logging him out from its website.

There are two options that you can use, first one is to use Google APIs and make a request to Google to log the user out (but that would log him out of his own session from your application, not not from Google's website).

Other way is to run the website in an iframe, iframe would load the page of logout command in iframe (chances are Google would manually cancel the request because of Same-origin policy) and then you would be able to redirect the user when the iframe loads (iframe would load once Google has finished logging the user out).

Chances are that are left with only API approach. Don't take it personally, Why create such functionality in the first place?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900