Oauth2 doesn't work after upgrading to 3.3

Oauth2 doesn't work after upgrading to 3.3

by Claus Tøndering -
Number of replies: 3

I've just tried to upgrade a site running Moodle 2.9.6 with the googleoauth2 plugin to version 3.3, in which the oauth2 plugin is part of the system core.

After configuring the oauth2 parameters, I tried logging in with an account that has previously been used with Google authentication. This resulted in the following message being displayed:

"An existing account was found with this email address but it is not linked yet. The accounts must be linked before you can log in. An email should have been sent to your address at xxx@xxx.xx. It contains easy instructions to link your accounts."

I did indeed get an email saying: "A request has been made to link the Google login xxx@xxx.xx to your account at 'XXX' using your email address. To confirm this request and link these logins, please go to this web address: https://XXX/auth/oauth2/confirm-linkedlogin.php?token=XXX".

But when I click that link, Moodle tells me: "Authentication plugin googleoauth2 not found".

The same thing happens if I try using Facebook login.




Average of ratings: -
In reply to Claus Tøndering

Re: Oauth2 doesn't work after upgrading to 3.3

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I would go through the settings.  When you go to Oauth set up page in moodle are all things checked there?  Any problems reported?

In reply to Emma Richardson

Re: Oauth2 doesn't work after upgrading to 3.3

by Claus Tøndering -

The settings are correct. I've been doing some digging, and it seems that the old googleoauth2 plugin configuration is not migrated to the new built-in oauth2 configuration.

According to https://moodle.org/mod/forum/discuss.php?d=352457  I need to manually edit every single entry in the user database table for users that use Google/Facebook authentication! This is not good.

In reply to Claus Tøndering

Re: Oauth2 doesn't work after upgrading to 3.3

by Ken Task -
Picture of Particularly helpful Moodlers

Please see this posting in the thread:

https://moodle.org/mod/forum/discuss.php?d=352457#p1440405

The mass conversion of users from old plugin to core plugin does involve manipulating the DB directly (something not normally done), but one doesn't have to do one at a time.

Before you begin a test ... make sure you have a sql dump of your database ... mdl_user table for sure.

And suggest using mysql to change just one user as a test first.  That would be a user whose Google credentials are known so you might have to acquire another google account for testing purposes.

'spirit of sharing', Ken