manfredsteyer / angular-oauth2-oidc

Support for OAuth 2 and OpenId Connect (OIDC) in Angular.
MIT License
1.86k stars 681 forks source link

Local parsing HTTP request error #1390

Open sevenNightL opened 5 months ago

sevenNightL commented 5 months ago

Describe the bug When I used localhost as the issuer to request, the request passed. However, when I used locally parsed keycloak as the request, the request reported an error.

Stackblitz example Provide a minimal stackblitz based example that shows the issue. For this, you can use the example application of this repo and the identity providers used here.

To Reproduce Steps to reproduce the behavior:

  1. Go to oAuthConfig

  2. image
  3. No problem,but Update OAuthConfig's Issuer like this

  4. image image
  5. problem is coming

    image

Expected behavior This request has been restored to normal

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

neversaid commented 5 months ago

Isnt it just a typo in your conf? You are connecting to http://keycolak ... Shouldn that be http://keycloak ? (Keycolak vs Keycloak?)

sevenNightL commented 5 months ago

Isnt it just a typo in your conf? You are connecting to http://keycolak ... Shouldn that be http://keycloak ? (Keycolak vs Keycloak?)

It has been changed now, but the error still persists。 image

image
neversaid commented 5 months ago

But in this case - for sure, this has nothing to do with the Library. As it looks, its a problem on your side with the name resolution. You can try a simple ping on your system to check if it resolves.

sevenNightL commented 5 months ago

But in this case - for sure, this has nothing to do with the Library. As it looks, its a problem on your side with the name resolution. You can try a simple ping on your system to check if it resolves.

Thank you for your answer. Currently, I can ping and access local parsing through HTTP。

image image

The only difference is local domain name resolution. When using localhost, there will be no errors, but when using keycloak, errors will be reported.

sevenNightL commented 5 months ago

But in this case - for sure, this has nothing to do with the Library. As it looks, its a problem on your side with the name resolution. You can try a simple ping on your system to check if it resolves.

Thank you for your answer. Currently, I can ping and access local parsing through HTTP。 image image The only difference is local domain name resolution. When using localhost, there will be no errors, but when using keycloak, errors will be reported.

image

This is for localhost, it did not report an error。

image

This is keycloak, it reported an error。

image