Moodle 4.1 - Moodle app

Moodle 4.1 - Moodle app

por Verónica V. -
Número de respostas: 2

Hello, I am writing to see if anyone else has had the same problem and was able to solve it.

We enabled the web service for mobile devices (enablemobilewebservice) and we get the following error: ‘can not create token’.

While searching for a solution, I found a suggestion to grant permission to moodle/webservice:createtoken, but I am unsure if this is safe, as Moodle indicates that it involves many risks.

I look forward to your response.
Thank you in advance.
Kind regards,
Verónica.

Em resposta a 'Verónica V.'

Moodle 4.1 - Moodle app

por Isabel Renedo -
Foto de Moodle HQ Foto de Particularly helpful Moodlers

Hi Verónica,

We would recommend that you also check that your “Authenticated user” role in  (Site administration > Users > Permissions > Define roles) to ensure that they have the following capabilities enabled:
 moodle/webservice:createtoken and moodle/webservice:createmobiletoken

Also, you need to check if “Authenticated user” is your default role for authenticated users.

Enabling those capabilities should be safe as you are doing manually what the “Enable mobile services” setting should automatically do.

Kind regards,

Isabel

Em resposta a 'Isabel Renedo'

Moodle 4.1 - Moodle app

por Verónica V. -

Hello Isabel, thank you very much for your reply.

It is precisely these capabilities that make me feel insecure, given the significant risks they pose:

And yes, the default role assigned is ‘authenticated user’.

I look forward to hearing another opinion on this matter.
Kind regards.
Verónica.