Saml stuck on redirect authentication nextcloud

Nextcloud version : 29.0.4
Operating system and version : Debian/GNU linux 12 bookworm
Apache or nginx version : Apache/2.4.61 (Debian)
PHP version : PHP 8.2.22
user_saml version : v6.2.0
keycloak version : 25.0.4

I followed this tutorial to the letter and also added the nextcloudquota mapper as recommended in the update. Now what I get is a redirection from Nextcloud to the Keycloak URL, complete with a working login. When I try to log in with Keycloak credentials, it says “authentication redirect please wait,” but then it redirects me back to the interface with the choice of login type. In Keycloak, it shows in the session section that the user logged in through Nextcloud, but there is no user logged in with Keycloak on Nextcloud.