IdentityServer / IdentityServer4

OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
https://identityserver.io
Apache License 2.0
9.23k stars 4.02k forks source link

Redirect to moder.url breaking when is4 call's protected api #5467

Closed uyau closed 2 years ago

uyau commented 2 years ago

I have some additional behavior, so I need to call protected api inside is4 when I try to authenticate with interactive user. So I'm using IdentityServerTools to issue access tooken for is4.

var token = await tools.IssueClientJwtAsync("is4", 100, new[] { "manage_role" });
httpClient.SetBearerToken(token);

then I call protected API, getting 200 status code. Everything is going fine. I authenticate user await HttpContext.SignInAsync(iduser, props); and it doesn't redirect me to the callback page of my React app. But if I don't use builder.Services.AddAuthentication().AddJwtBearer... Everything is working fine. And redirect is working. Even with IdentityServerTools, so problem is somewhere in the point, where API is cheking my token. Do someone have any idea why?

leastprivilege commented 2 years ago

Important update

This organization is not maintained anymore besides critical security bugfixes (if feasible). This organization will be archived when .NET Core 3.1 end of support is reached (3rd Dec 2022). All new development is happening in the new Duende Software organization.

The new Duende IdentityServer comes with a commercial license but is free for dev/testing/personal projects and companies or individuals making less than 1M USD gross annnual revenue. Please get in touch with us if you have any question.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Questions are community supported only and the authors/maintainers may or may not have time to reply. If you or your company would like commercial support, please see here for more information.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.