Added possibility to sign in users by internal user database id#111
Conversation
|
Help me understand this feature, so if i am logging in users from an external service and I pass the right information. Thank you |
Yes — the feature will use the actual Moodle user ID. In the original auth_userkey workflow, the external service typically creates the user in Moodle and sets the idnumber field to an identifier that the external system knows. Login URLs are then generated based on that idnumber, not the internal userid. In our case, the external service already knows the Moodle userid, and we don’t need to manage or set an additional idnumber. Because of that, we can request a login URL directly using the real, internal Moodle userid. Example: Auth_userkey will then return the login URL for that user. The main benefit of using the internal userid is that it’s stable and cannot be changed, unlike other identifiers such as idnumber. |
|
Thanks for contributing. Before we can move forward with this change, can you please create a new issue and describe what problem you're trying to solve (you pretty much done that as part of this PR). This would help others to find the issue if they are after the same feature. |
|
@MagnusSamuelsson thanks for applying fixes. It's almost ready to be integrated. With a couple of small tweaks, please also bump the plugin version so a new lang string can be picked up. CI fails are not related to this changes. |
For sure! |
This update introduces the ability to sign in users by their user ID.
This was required to support our authentication workflow and improves flexibility in how users can be authenticated.