Gitlab integration - Getting "Username Required field"

Gitlab integration - Getting "Username Required field"

by Silicon Berry -
Number of replies: 2
Hi, 

I tried to integrate Moodle with gitlab login using oauth2 services. I'm able to add it, when I try to connect from a moodle login page, I'm getting "No user information was returned. The Oauth 2 service may be configured incorrectly" 

from OAuth2services page, when I clicked the "half opened door" (connect to a system account), I'm getting Error: Username Required field.

I tried to change all the settings in Gitlab as well as in Moodle, however everything went vain. ANY HELP WOULD BE GREATLY APPRECIATED. Thanks ! 

Attachment connect_to_system_error.png
Attachment loginPage_error.png
Average of ratings: -
In reply to Silicon Berry

Re: Gitlab integration - Getting "Username Required field"

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I don't know anything specific for GitLab but presumably you've added this as a custom issuer in Moodle. Have you configured the endpoints? Presumably it's the endpoint with name = userinfo_endpoint that retrieves user information, have you added this in Moodle for the GitLab OAuth 2 service? What is it set to?

In reply to Leon Stringer

Re: Gitlab integration - Getting "Username Required field"

by Silicon Berry -
Hey, Thanks for your comment. I finally able to figure out how to resolve this issue..

Instead of trying with Gitlab, I tried with OpenID Connect method which is supported by Gitlab. By enabling profile, email and openid in moodle and gitlab settings, I'm able to integrate it .

For those who are facing this issue in the future - Try to set it up with openid details, instead of Gitlab default settings.. Troubleshooting is key !