npm - Getting "Invalid parameter: redirect_uri" trying NODE.JS authentication with KeyCloak -
i'm using node.js (express) , npm called keycloak-connect connect keycloak server.
when i'm implementing default mechanism described protect route:
app.get( '/about', keycloak.protect(), function(req,resp) { resp.send( 'page: ' + req.params.page + '<br><a href="/logout">logout</a>'); } );
i referred keycloak, following error: "invalid parameter: redirect_uri"
my query string is: (xx demonstration)
https://xx.xx.xx.xx:8443/auth/realms/master/protocol/openid-connect/auth?client_id=account&state=aa11b27a-8a0b-4a3b-89dc-cb8a303dbde8&redirect_uri=http%3a%2f%2flocalhost%3a3002%2fabout%3fauth_callback%3d1&response_type=code
my keycloak.json is: (xx demonstration)
{ "realm": "master", "realm-public-key": "miibijanbgkqhkig9w0baqefaaocaq8amiibcgkcaqeaws00kuah6ooernskfuwxebxx2ssqmhu9ovqips6nlp9fnqm0ck2lpnpphblzoozl6kivac4vzxg20f3zy7jrdc4u/xhgxjzvzuxxj0neci5esdo00ev9xh9xl3xvxslmg0ylwpywtqsyc+xcgdkz87edokbhqiilqc2sgovkikpajzyri5wnymhl8jsk+mdo2t9dennzxpkauikbwwfjrebo51gsoz49cbd39fra8pli8w0ttxoesif/egusdc3revvfr7cjzhuzxf0p0wrlsta1abclkt8yhnq88nqcksw5mkxrmhldw20odtdsmrtm68rjtusmwifo/dzlj9v5eqidaqab", "auth-server-url": "https://xx.xx.xx.xx:8443/auth", "ssl-required": "external", "resource": "account", "credentials": { "secret": "9140d4e6-ed05-4899-a3c0-a9cf94ab407d" }, "use-resource-role-mappings": true }
keycloak configuration:
i guess added port client urls in client settings tab.
e.g.
root url: https://demo.server.biz:443/cxf
just remove port
root url: https://demo.server.biz/cxf
the same goes valid redirect uris
, web origins
Comments
Post a Comment