Using the Identity Server API

Hi,
I’m trying to implement a OAuth 2.0 protocol Client using oauth2-client-js in my frontend application running locally on ‘http://localhost:8080’ .
when i try the authentication using my redirect url ‘http://localhost:8080/#/someView’ i keep getting ‘Forbidden’ Error with ‘Invalid redirect URL’.
I’m wondering if I need an HTTP Endpoint in a backend server to catch the redirect ? or is it possible to do it like this?
Error Log:

     WARN OAuth error                              error=error:pkg/oauth:invalid_redirect_uri (invalid redirect URI) error_cause=urls don't validate: https://localhost/console/oauth/callback;/console/oauth/callback / http://127.0.0.1:8080/#/geolocator method=GET namespace=web remote_addr=172.21.0.1:43950 request_id=01DVJZ9YYYG73GWWC0DH950C58 url=/oauth/authorize?response_type=token&scope=&client_id=console&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2F%23%2Fgeolocator&state=code


  INFO Request handled                          duration=117.5912ms method=GET namespace=web remote_addr=172.21.0.1:43950 request_id=01DVJZ9YYYG73GWWC0DH950C58 response_size=1618 status=403 url=/oauth/authorize?response_type=token&scope=&client_id=console&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2F%23%2Fgeolocator&state=code


  INFO Request handled                          duration=111.6666ms method=GET namespace=web remote_addr=172.21.0.1:43950 request_id=01DVJZA0521NKX0T0S00P9WJGV response_size=205 status=200 url=/oauth/api/me

I was also wondering if it is implemented at all, or does all the user management is only available from the cli.

In the meantime, i searched for some other possibilities for the Oauth Client and i’m still testing the Spring Oauth client (in this case with an HTTP End-point for redirection). I don’t know if I will see it through. If so, I will post the results here.

This topic was automatically closed after 30 days. New replies are no longer allowed.