Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O365 error login #257

Open
AngelVillalbaQ opened this issue Sep 26, 2023 · 1 comment
Open

O365 error login #257

AngelVillalbaQ opened this issue Sep 26, 2023 · 1 comment
Labels
configuration third-party-plugin Related to non core plugins

Comments

@AngelVillalbaQ
Copy link

I have had login problems when merging 2 oidc accounts, the merge is done without any problem but the account that keeps the data cannot login, it shows an error.

Error code: errorauthunknownstate moodle
line 204 of /auth/oidc/classes/loginflow/authcode.php: moodle_exception thrown

@jpahullo
Copy link
Owner

jpahullo commented Dec 1, 2023

Hi @AngelVillalbaQ ,

This plugin auth_oidc is not a core plugin, so that you need to analyse plugin tables to see which fields are related to user.id and define your own settings on mergeusers/config/config.local.php, similar to what we provide in https://github.com/jpahullo/moodle-tool_mergeusers/blob/master/config/config.php#L57, like:

<?php
defined("MOODLE_INTERNAL") || die();

/**
 * Custom settings.
 */
return [
    // If some index exists involving some field related to core user.id field.
    'compoundindexes' => [
        'oidctablename' => [
            'userfields' => ['userfieldname'],
            'otherfields' => ['otherfieldname'],
        ],
    ],
    // If some table has some field related to core user.id field and has some specific name, not standard as you can see on:
    // https://github.com/jpahullo/moodle-tool_mergeusers/blob/master/config/config.php#L153
    'userfieldnames' => [
        'oidctablename' => ['userfieldname1', 'userfieldname2'],
    ],
];

Thanks for the feedback.

Let me know how it goes.

Jordi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration third-party-plugin Related to non core plugins
Projects
None yet
Development

No branches or pull requests

2 participants