cuzy-app / auth-keycloak

Keycloak Sign-In
6 stars 6 forks source link

Error after updating #12

Closed jooooaah closed 8 months ago

jooooaah commented 9 months ago

After updating the most recent version of (1.4.1) keycloak-login the most recent humhub version don't work anymore. After hitting the keycloak authentication button keycloak mask shows up - i can enter my credentials but the redirect link goes back to the login-page.

Sory that i can't provide more data - it's on humhub professional hosting and with help of humhub support we step down to older plugin version - now it works again.

marc-farre commented 9 months ago

What is the version of your Keycloak server?

Can you check the logs in Administration -> Information -> Logging?

jooooaah commented 9 months ago

unfortunately, we can no longer track this exactly - it was a update on a live system. KC is 17.0.1 but we currently preparing update on 23.0.5

marc-farre commented 9 months ago

I see. The new module version was only tested on Keycloak 22 and 23. Please let me know if it works after upgrading to Keycloak 23 and I will add this requirement in the module documentation.

FYI, this new version of the module uses Open ID connect protocol instead of Oauth 2.

And also it requires PHP 8.0 or later (see requirements here). You should check the version of your PHP in Administration -> Information -> Prerequisites

jooooaah commented 9 months ago

thanks - I will report here if the error occurs again after upgrading to version 23. We have already figured out the PHP version and fixed it :) good hint with OIDC!

Fabien-inexine commented 8 months ago

I have the same problem after updating from 1.3 to 1.4.1. My version of keycloak is 23.0.3, php 8.1 and humhub 1.15.3.

marc-farre commented 8 months ago

@Fabien-inexine thanks for reporting.

Have you upgraded from GitHub (by cloning the repository) or from HumHub marketplace? If from GitHub, you need to update composer.

There must be a setting (on Keycloak or HumHub) that needs to be changed to make it work with this new version, but I cannot tell which one. I'm currently using it with success on Keycloak 23.0.3, HumHub 1.15.3 and PHP 8.2, which is similar to you.

I use this setting on HumHub: image

And on Keycloak: image

Check also the instructions in the module settings: image

If you find the solution, please share it, so I can update the documentation. Thanks!

Fabien-inexine commented 8 months ago

I use the market place version. I switched to php 8.2 but I have the same problem. I’m on ubuntu 22.

The keycloak configuration is ok. The module configuration also normally.

marc-farre commented 8 months ago

@Fabien-inexine Can you have a look to this:

image

image

image

And also if you have error messages in the Console tab, or in Humhub logging?

Fabien-inexine commented 8 months ago

I don’t have a call on authenticate/session_code Here is the debug when I click on "connect with keycload"

Capture d’écran du 2024-02-16 11-23-17

I have no errors in the console and humhub loggins

marc-farre commented 8 months ago

Sorry, but I don't know what's happening. If you need paid support, contact me on https://cuzy.app/contact

I will need:

And a screenshot of your module settings on HumHub.

This will allow me to test on my local HumHub instance and fix the issue.

Fabien-inexine commented 8 months ago

@marc-farre , i just found it. Missing the php-bcmath module. After installing it, it works.

marc-farre commented 8 months ago

@Fabien-inexine thanks very much for your researches and your feedback.

I didn't know it was a requirement, as it's marked as highly recommended in the JWT Key Management Component library: https://web-token.spomky-labs.com/introduction/pre-requisite

I've updated the module requirements in the last commit: https://github.com/cuzy-app/humhub-modules-auth-keycloak/commit/7a48f151b11512e2e4226ef74c6cc310a86efc78#diff-0b5ca119d2be595aa307d34512d9679e49186307ef94201e4b3dfa079aa89938R26

And I've released a new version of the module: https://github.com/cuzy-app/humhub-modules-auth-keycloak/releases/tag/1.4.2 It should be soon available on the marketplace (it only adds these new requirements).