o365-moodle icon indicating copy to clipboard operation
o365-moodle copied to clipboard

Error code: errorauthgeneral, for some users but not all after auth on Office365

Open adityawisenet opened this issue 3 years ago • 1 comments
trafficstars

Hi GitHub

I'm having trouble with Moodle and O365 auth.

Some users, but not all get errorauthgeneral error after succsessful login on login.microsoftonline.com.

The error is as below:

Stack trace: line 469 of /auth/oidc/classes/loginflow/authcode.php: moodle_exception thrown line 278 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\loginflow\authcode->handlelogin() line 116 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\loginflow\authcode->handleauthresponse() line 168 of /auth/oidc/auth.php: call to auth_oidc\loginflow\authcode->handleredirect() line 31 of /auth/oidc/index.php: call to auth_plugin_oidc->handleredirect()

The issue is similar to the one in thread - https://github.com/microsoft/o365-moodle/issues/1164

The Moodle version - Moodle 3.10.8+ (Build: 20211203)

$plugin->version = 2020110925; $plugin->requires = 2020110900; $plugin->release = '3.10.5'; $plugin->component = 'auth_oidc'; $plugin->maturity = MATURITY_STABLE;

Can we have some inputs to resolve this

Thanks

adityawisenet avatar Feb 16 '22 23:02 adityawisenet

Hi @adityawisenet,

Could you confirm for the users who see this error, do they always see this error when logging in, or only occasionally please.

From the look of it, this does look similar to the linked issue, which should have been fixed. The fix applied to the the linked issue involves running a scheduled task "auth_oidc\task\cleanup_oidc_state_and_token" on every Moodle cronjob run, which removes invalid token records. Could you confirm if the task is running and finishing correctly please.

If the task is not the issue - could you confirm if the issue can be reliably reproduced please. If so, I'm happy to arrange a quick call with you to do some quick troubleshooting.

Regards, Lai

weilai-irl avatar Feb 18 '22 11:02 weilai-irl