mattmorg55 / Owin.Security.Keycloak

Keycloak Authentication Middleware for the C# OWIN Pipeline
http://keycloak.jboss.org
MIT License
17 stars 20 forks source link

redirecct url #19

Open spegghy69 opened 3 years ago

spegghy69 commented 3 years ago

I'm using keycloak for a complex project. all of my web servers are working behind load balancer implementing HTTPS protocol (the backend are all on HTTP).

All is working except .net web app : the redirect_uri is coded as http: how to place a complete redirect_uri (https://servername.domain.dom/Home/index ) instead of only the path (/Home/index )

Thank you

highbyte commented 3 years ago

I encountered a similar problem with a proxy in front of an application. Couldn't find an option to use a relative redirect.

If I recall correctly the solution was to configure the proxy to set X-Forwarded-Proto header, and set the request scheme in the application via middleware based on the header. Or just always force the request scheme to https in the application middleware.

Similar to this: https://stackoverflow.com/questions/24213614/appharbors-reverse-proxy-causing-issues-with-ssl-and-app-useoauthbearertokens-a/24215799#24215799

spegghy69 commented 3 years ago

Thank you we will try