zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

Redirect URI not HTTPS #283

Closed Adrian-at-CrimsonAzure closed 3 years ago

Adrian-at-CrimsonAzure commented 3 years ago

I am using Keycloak for OpenID-Connect, and I kept getting invalid redirect_uri errors. Finally figured out that it hasn't been passing an HTTPS URI.

Social Login:

redirect_uri=http%3A%2F%2Fcloud.DOMAIN.com%2Fapps%2Fsociallogin%2Fcustom_oidc%2FKeycloak

If I manually add the missing s, everything works. Is this a configuration issue or a bug? \ \ \ \ \ It's also using HTML character codes instead of regular characters which is strange IMO. Portainer example:

redirect_uri=https://portainer.DOMAIN.com&scope=openid%20profile%20email
zorn-v commented 3 years ago

изображение Check readme

Adrian-at-CrimsonAzure commented 3 years ago

Keycloak authenticates the user and creates a one-time, very short lived, temporary code. Keycloak redirects back to the application using the callback URL provided earlier and additionally adds the temporary code as a query parameter in the callback URL.

AFAIK there's no way to override the callback URL on the Keycloak side just whitelisting for valid callbacks. Thanks for pointing out the overwriteprotocol setting, don't know how I missed that.