Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alistefano opened this issue Jan 3, 2018 · 3 comments
Open

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

alistefano opened this issue Jan 3, 2018 · 3 comments

Comments

@alistefano
Copy link

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

@stuartbfs
Copy link
Contributor

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

@alistefano
Copy link
Author

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
Copy link
Contributor

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?

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

No branches or pull requests

2 participants