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

IdentityServer4.AspNetIdentity Upgrade and api issue #2

Open
fetullahyldz opened this issue Oct 28, 2022 · 8 comments
Open

IdentityServer4.AspNetIdentity Upgrade and api issue #2

fetullahyldz opened this issue Oct 28, 2022 · 8 comments

Comments

@fetullahyldz
Copy link

fetullahyldz commented Oct 28, 2022

Hi IdentityServer4.AspNetIdentity I upgraded to the latest version but it logs in with SampleApiConsumers but the categories are not listed and it gives an error.

An unhandled exception occurred while processing the request.
HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()

Could you please help me, I searched a lot for the reason of this but I couldn't find it.

@fetullahyldz
Copy link
Author

image_2022_10_28T13_35_38_988Z

@fetullahyldz
Copy link
Author

@nqtuyen @thiennn Please help with this issue

@fetullahyldz
Copy link
Author

I downloaded all the projects and when I tried, there is the same problem, I think it was related to net6 upgrade, can you please have a look at this, I couldn't solve the problem. @thiennn @nqtuyen

@nqtuyen
Copy link

nqtuyen commented Nov 11, 2022

Do you have Client with the same Id & secret and Authority on your IS4?
Check Scope & RedirectUris.
Example client:

           `new Client
            {
                ClientId = "mvc",
                ClientSecrets = { new Secret("secret".Sha256()) },

                AllowedGrantTypes = GrantTypes.Code,

                // where to redirect to after login
                RedirectUris = { "https://localhost:7106/signin-oidc" },

                // where to redirect to after logout
                PostLogoutRedirectUris = { "https://localhost:7106/signout-callback-oidc" },

                AllowOfflineAccess = true,

                AllowedScopes = new List<string>
                {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,
                    "api.simplcommerce"
                }
            }`

@fetullahyldz
Copy link
Author

Hi thank you for your reply but this is available and when i do get i get error 401

@fetullahyldz
Copy link
Author

Please download and test the two projects and you will see the problem. There was no problem in version 3.1.

@fetullahyldz
Copy link
Author

I log into SampleApiConsumers, I can get tokens and when I refresh the token the problem persists, when I list the categories this problem occurs. I looked at the token in jwt.io, everything is fine but I don't quite understand what's wrong. Is there a new feature in the header with net6 and this issue stopped working in net5 and above please help @nqtuyen @thiennn @hishamco

@fetullahyldz
Copy link
Author

I think everyone has withdrawn from this project and no one is responding. then do i have to leave this project as a whole?

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