1

I am trying to integrating keycloak with angular but I am facing issue invalid_redirect_uri/Page_not_found error.

error login

Here is the Keycload configuration:

Angular setting

console

Spent hours on googling but failed.

enter image description here

Hamid Shah
  • 31
  • 6
  • Can you share the full authorization url which the angular app constructs? it's shortened in your first image. – Umakanth Oct 12 '22 at 11:52
  • here: http://localhost:8080/auth/realms/web-portal/protocol/openid-connect/auth?client_id=web-angular&redirect_uri=http%3A%2F%2Flocalhost%3A4200%2F&state=c0471008-4019-46f8-9fcc-872b076d4b42&response_mode=fragment&response_type=code&scope=openid&nonce=8aeabf9e-a9f5-482e-8233-e1a6e0c975ad – Hamid Shah Oct 12 '22 at 12:23
  • Image added.. Now you can check – Hamid Shah Oct 12 '22 at 12:25

3 Answers3

1

Since it too long for a comment I will post here.
I am assuming you have not changed the default keycloak port, there is only one possible issue I see
By default keycloak quarkus has removed the /auth from it api's and you need to explicitly set if you require this property.

http-relative-path=/auth

This can be set in the keycloak.conf file in /conf directory.

Umakanth
  • 686
  • 1
  • 5
  • 17
1

A quick way to get the right configuration settings is in the upper right corner on the client detail page.

There is a dropdown with the option

Download adapter config

This should present the config to you, as Keycloak expects it to be.

0

In my case I just had to remove auth from url and it started working.

Kitwradr
  • 1,986
  • 3
  • 18
  • 32