LMSouq
moodle-core Open

Cannot log in with Keycloak using OIDC Plugin for Moodle

FA
Fabio Fortini
1 month ago
3 views
Problem Description
I'm trying to improve the moodle login through Keycloak service. I installed this plugin (https://moodle.org/plugins/auth_oidc) on my local instance and after the installation I started to compile all the fields. The plugin provides a button in the login page that, on click, redirects to my keycloak login page. When I press "login" on keycloak what I expect is to return on moodle in a page like "registration page" where a user can add himself, but what I get is that I'm not logged and this error is displayed: Debug info: Error code: erroroidccall ×Stack trace: line 47 of /auth/oidc/classes/utils.php: moodle_exception thrown line 252 of /auth/oidc/classes/oidcclient.php: call to auth_oidc\utils::process_json_response() line 177 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\oidcclient->tokenrequest() line 84 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\loginflow\authcode->handleauthresponse() line 105 of /auth/oidc/auth.php: call to auth_oidc\loginflow\authcode->handleredirect() line 29 of /auth/oidc/index.php: call to auth_plugin_oidc->handleredirect() This error isn't explained in moodle docs. I saw the php but I didn't find anything helpful. In the code of the plugin I tryed to search the handleredirect() method but I didn't find it. Is there someone who fixed this error using keycloak (or other third-part oidc services)?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base