Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Carol C -
Number of replies: 7

Hi,

I'm trying to use the OAuth 2 for authentication on moodle 3.3, but I keep ending up with this error when I try to login using any social network:


Debug info:
Error code: missingparam

Stack trace:
  • line 503 of /lib/setuplib.php: moodle_exception thrown
  • line 568 of /lib/moodlelib.php: call to print_error()
  • line 73 of /lib/sessionlib.php: call to required_param()
  • line 84 of /lib/sessionlib.php: call to confirm_sesskey()
  • line 30 of /auth/oauth2/login.php: call to require_sesskey()
I found some issues about this error with another aplications and the advise was to check if php.ini parameters for upload size and others was with a considerable size, but I've already checked up php.ini params and it's all okay.

Is there someone having the same problem? What sould I do?


Average of ratings: -
In reply to Carol C

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Ken Task -
Picture of Particularly helpful Moodlers

Do all of the social network logins fail with the same error?

Is your site using DB for sessions?

As manual admin user -> site admin menu -> Server -> Session Handling

Use database for session information dbsessions - default is no ... box is NOT checked.

It would also be helpful to look at web servers error logs in addition to debugging.

There was a bug tracker item that was strange ... similar error ... after an upgrade/update to a 3.3.x the fix was to go back into the configuration of whatever social site was using, check settings, and SAVE.  Dunno if that's your same issue or not.

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Carol C -

Yes, the error is the same for all social networks.

I'm not using DB for sessions, it still with the default settings.


Looking at the error logs I found this (and many others, but I thought this was most relevant):

Fatal error:  require_once(): Failed opening required '/config.php'

RSA server certificate wildcard CommonName (CN)  does NOT match server name!?

Earlier I found that the file "config.php" was with some restrict permissions, so I changed them to make sure the plugin could at least read or execute it since it is a requirement, but I still getting the error.

I can't access earlier logs for more detailed info (and don't know why), when I open the file all I get is a bunch of symbols.


In reply to Carol C

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Ken Task -
Picture of Particularly helpful Moodlers

All of the Oauth2 authentication services probably require communications via SSL ... uhhh ... more than likely TLS now.

See the error:

RSA server certificate wildcard CommonName (CN)  does NOT match server name!?

On your site, do you have a 'green lock' on the URL line which indicates site is secure and has info about who the CA (Certificate of Authority) issuer is?

The error is saying the certificate you have installed on your server is a wildcard cert .... like *.sosoftexas.org (which means any host in the top level domain) .. the CommonName in that cert doesn't match server name.

To get more info on your server certs:

https://www.ssllabs.com/ssltest/

and enter the URL to you site.

If you are remotely hosted somewhere and hosting provider provided certs, check with hosting providers help desk.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Carol C -
The domain I'm using doesn't have a real CA, the hosting provider I'm using provides an alternative link with a "safe domain", but even using it the plugin still returning this error.

I'll try to test in some other domain of the same server to see if the problem is the limitations of the hosting provider.

I'll post here If I make some progress or find new errors about this.

Thank you for your help!
In reply to Carol C

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Ken Task -
Picture of Particularly helpful Moodlers

Interesting ... never heard of a 'safe domain' provided by a provider!

Do you mean like this:

https://www.onlydomains.com/domains/new/.safe

"At this stage we cannot confirm if the .safe gTLD will be open to the public. For this reason we'll still allow requests to reach our database but should the gTLD end up being classified as closed then any requests we receive will be cancelled."

That would certainly produce the error about 'CA doesn't match' I would think.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Carol C -
I'm sorry, I think I may have said it wrong. It happens that when I get a new domain, the hosting provider gives me a https URL that points out to the main URL. But even using that, it doesn't work.

I tested in another domain (another moodle version too), and besides the same warning about the CA, the plugin worked out fine.. the only difference between the two moodles is that the one that I tested is one version earlier (3.3.1) than the one that I'm getting the error (3.3.3).

Maybe the problem is not the server, I don't know... I'm about to give up and upgrade the version.

I apologize if I misexplained something or the writing is confusing, I'm still learning engilsh.

Thank you for your attention.
In reply to Carol C

Re: Moodle 3.3 OAuth 2 Error (required parameter (sesskey) was missing)

by Ken Task -
Picture of Particularly helpful Moodlers

Think your English is just fine ... it's just a difficult problem to describe! ;)

So the provider gives customers the use of a certficate for their sites ... by chance is that a cert for cPanel ?  That you  are trying to use for Moodle's?

Using a cert ssl/tls checker like ssllabs might help you determine what's going on.

https://www.ssllabs.com/ssltest/

'spirit of sharing', Ken