Skip to content

No way to set authentication method for autocreated/new users #931

@fhkevin

Description

@fhkevin

Problem

Currently, when a new user is "autocreated" via SAML2 (auth_saml2 | autocreate), the plugin automatically sets the user’s auth field to saml2. Even though there is a check in the code to only set it if $user->auth is empty:

if (empty($user->auth)) {
    $user->auth = 'saml2';
}

...it seems like there is no way to fill this field:

  • There is no GUI option on the admin/settings.php?section=authsettingsaml2 settings page to change the auth method
  • There is no idP claim which gets accepted for the auth field
  • There is no setting for it in the config.php file inside the plugin root folder
  • It seems like not even the code touches the user->auth field except for the check from before

This issue affects setups with Dual Login enabled and existing other auth methods (e.g.: ldap) where administrators want to allow SAML2 login for new users but still have them authenticate via another auth method.

Environment

  • Moodle: 4.5.7
  • Auth SAML2 Plugin: latest MOODLE_405_STABLE release

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions