Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Signout for google throws #1039

Closed
brockallen opened this issue Nov 15, 2016 · 18 comments
Closed

Signout for google throws #1039

brockallen opened this issue Nov 15, 2016 · 18 comments
Assignees

Comments

@brockallen
Copy link

In Katana when you called Signout for social providers, it no-op'd. In Core, it now throws since the default base class has no implementation (not supported exception). Perhaps it should not throw. // @blowdart

@Tratcher
Copy link
Member

This was an intentional change to highlight that signout is not supported for some providers. Cookies and OIDC are the only ones that support sign-out right now.

@brockallen
Copy link
Author

Yea, sucks for writing a generic logout logic then. It needs to be wrapped in try/catch for NSE.

@blowdart
Copy link
Member

Funny I was talking to Dominick about this last night. I'm actually with Brock and Dominick on this one, because it's a horrible shock to folks upgrading from Katana. I'd lean towards no-op, with logging as a warning, rather than throwing an exception

@Tratcher
Copy link
Member

But why are you calling SignOut on random providers? Challenge is the only API directly supported by all providers. For 1.0 we also made Authenticate pass through the OAuth providers so it looks like it works. But SignIn and SignOut? Cookies is the only one that really supports either, and we re-purposed SignOut on OIDC for remote sign-out. I don't see how SignOut can make sense for Windows auth, Bearer, Basic, etc. any more than it does for SignIn.

Why not have SignOut(Google) pass through to SignOut(Cookies) like we do for Authenticate? Then at least it would do what you asked.

@brockallen
Copy link
Author

brockallen commented Nov 16, 2016

Because in our token service, all we track the middleware used for external authentication as a claim. At signout time we need to trigger it, but we don't know if it was social or otherwise (such as AAD, ADFS, etc) See here: https://github.com/IdentityServer/IdentityServer4/blob/dev/src/Host/Controllers/AccountController.cs#L207

@Tratcher
Copy link
Member

Ok, so you're trying to trigger the remote sign-out which is only implemented for OIDC right now. WsFed had this as well(?), but none of the other providers implement it. Then you follow up by deleting the auth cookie which makes sense.

You never do this for the persistent auth types correct? Windows, Bearer, Basic, etc?

@brockallen
Copy link
Author

There is no UI for Bearer. Windows wouldn't make sense, since logging out would mean signing out of the OS. Basic... no idea. That's not terribly relevant for IdentityServer (in the UI at least).

@Eilon
Copy link
Member

Eilon commented Nov 17, 2016

From @blowdart

I'd lean towards no-op, with logging as a warning, rather than throwing an exception

We discussed this and this seems reasonable.

Would it make sense for the social providers to pass through and call SignOut on the cookie auth provider?

And then what should Windows auth (throws) and Bearer auth (throws) do for SignOut?

@brockallen
Copy link
Author

Would it make sense for the social providers to pass through and call SignOut on the cookie auth provider?

I'd say no, as apps today are already aware that they are expected to clear their own cookie, plus it's hard to know what cookie middleware was ultimately used. In short, leave this up to the app (as it already is today).

@brockallen
Copy link
Author

And then what should Windows auth (throws) and Bearer auth (throws) do for SignOut?

Nop as well, I'd imagine, for the same reasons the social ones do.

@blowdart
Copy link
Member

@Eilon Yea, what brock said, because you have no idea if cookie middleware is even there.

@Eilon
Copy link
Member

Eilon commented Nov 18, 2016

Yep this makes sense.

@Tratcher Tratcher added this to the 2.0.0 milestone Dec 8, 2016
@Eilon
Copy link
Member

Eilon commented Mar 2, 2017

@HaoK can you close this because this should be taken into account in the Big Auth Redesign of 2017.

@brockallen
Copy link
Author

But despite the Big Auth Redesign of 2017, the existing authentication infrastructure will remain, no? So, IMO, this should still be fixed.

@Eilon
Copy link
Member

Eilon commented Mar 3, 2017

@brockallen given the redesign stuff, we don't have plans to do a further release of the current design (aside from patches, which are non-breaking).

@HaoK
Copy link
Member

HaoK commented Mar 3, 2017

So we do have the opportunity to pick the new behavior for the new stack. @blowdart @Tratcher throw or no throw in the RemoteAuthenticationHandler for SignIn/SignOut (as it stands the code ported from 1.0 still throws NotSupportedException). Personally I could go either way on this

@Tratcher
Copy link
Member

Just no-op then.

@HaoK
Copy link
Member

HaoK commented Apr 13, 2017

Tracked via #1179

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants