wwwlicious / servicestack-authentication-identityserver

A plugin for ServiceStack and IdentityServer that provides OpenIDConnect / OAuth 2.0 Single Sign-On Authentication
Other
29 stars 15 forks source link

Error in redirect if you call directly auth/IdentityServer #10

Open alistefano opened 6 years ago

alistefano commented 6 years ago

Hi, I noticed that if you call directly the endpoint auth/IdentityServer the webservice not redirects to Identity Server

Steps to reproduce:

If you call directly auth/IdentityServer -> error if you call first the protected endpoint and after auth/IdentityServer -> the redirect works

stuartbfs commented 6 years ago

Calling the endpoint directly isn’t a valid scenario as identity server requires an endpoint to return to.

alistefano commented 6 years ago

All other oauth providers (Facebook, Twitter, etc) redirect correctly to theirs identity endpoints You can try them by configuring any auth provider and call directly the endpoint

http://yourwebservice.url/auth/facebook http://yourwebservice.url/auth/twitter ...

If no redirects are configured in the connect url they return to default ss metadata page. This should be the standard behavior of the servicestack auth providers.

The current behavior could be a problem if you need to authenticate a client directly, without first calling a protected endpoint

stuartbfs commented 6 years ago

Identity server implements openid connect so isn't necessarily going to have the same workflow as the other oauth providers. Can I check why you would want to authenticate a client then not call a protected endpoint?