views:

56

answers:

1

Is there a way to render a "Sign Out" button using DotNetOpenAuth.

Basically I need some sort of Log In status control, that would display the OpenId login form, just like OpenIdLogin Control does, if the user is not logged in and it would show a Sign Out link along with some sort of message like "Welcome back user" once the user logs on.

Thanks!

Zen

A: 

You can use the standard LoginStatus or LoginView ASP.NET control for this. DotNetOpenAuth doesn't add anything special about a logged in user -- you typically just use FormsAuthentication with it.

Andrew Arnott
Thanks Andrew!What is the URL I shuold use to log users completely off of let say MyOpenID?Zen
UncleZen
You can't. OpenID doesn't offer a single-sign-out feature. Technically each OP probably has a URL that will log the user out and you could navigate the user to it in a hidden iframe using a fixed list of URLs for each OP that you maintain yourself, but your users might not like you for it.
Andrew Arnott
Thanks Andrew.In the application that acts as an RP, I have already implemented the Sign Out functionality. However, when the user logs off they remain logged in at MyOpenID, which means that when they try to log back on they will not be prompted to enter their password as they will be automatically logged in. They would have to close the browser to completely sign out. Do you know how can I resolve this issue?Thanks!Zen
UncleZen
That's the OpenID single-sign-out feature that doesn't exist (and isn't likely to exist in the future). If you have security requirements that demand the user needs to re-enter their password, you have to only allow certain OPs to be used to log into your RP, and send those trusted OPs a PolicyRequest (PAPE) that indicates that the user must be forced to log in again even if they are already logged into the OP. It's bad manners to log the user out of someone else's web site.
Andrew Arnott
Thanks a lot Andrew!
UncleZen