oauth2 force account chooser?

oauth2 force account chooser?

by Dirk Grunwald -
Number of replies: 0

We're using oauth2 w/Google as our primary authentication method. Students all have a G-suite account that they are supposed to use to log into moodle.

Some students attempt to authenticate from a browser that has only their private Gmail account and doesn't have their G-suite account as an option (because they haven't done it). They immediately get a "fail" message because I'm restricting the email to the G-suite mail.

This occurs because there's a single account available and the default action is to then use that.

With Google's oauth, it's possible to force an account chooser -- it would then give the student the option of logging into their G-suite account to authenticate, eliminating that confusing failure.

This stackoverflow article https://stackoverflow.com/questions/14384354/force-google-account-chooser shows how to do this. There's also documentation at Google https://developers.google.com/identity/protocols/OpenIDConnect#prompt and also appears to be standard in OpenID Connect - http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest


I'm trying to see if this can be configured using the current code base or if the feature exists and I'm not seeing how to configure it. 

I'm having a hard time finding where options to the authentication are generated and if this this be a per-provider option or a general oauth2 option should I choose to implement it.

Average of ratings: -