servicestack-authentication-identityserver
servicestack-authentication-identityserver copied to clipboard
Error in redirect if you call directly auth/IdentityServer
Hi, I noticed that if you call directly the endpoint auth/IdentityServer the webservice not redirects to Identity Server
Steps to reproduce:
- Create a new empty SS instance with a protected endpoint with a simply [Authenticate] Tag
- Basic plugin configuration: Plugins.Add(new IdentityServerAuthFeature { AuthProviderType = IdentityServerAuthProviderType.UserAuthProvider, AuthRealm = "http://localhost:5000/", ClientId = "xxxxx", ClientSecret = "xxxxx", Scopes = "openid" });
- Start the webservice
If you call directly auth/IdentityServer -> error if you call first the protected endpoint and after auth/IdentityServer -> the redirect works
Calling the endpoint directly isn’t a valid scenario as identity server requires an endpoint to return to.
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
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?