Login Password does not stored in the App

Login Password does not stored in the App

by Pia Liersch -
Number of replies: 4
Hello,

we have a problem with the Moodle App (3.7.0) (checked with Android and iOS) and our Moodle (3.6).
After our Upgrade of the Moodle 3.5 to the version 3.6, the Moodle application any more the password does not store.

If I close the application, I must always give my password.

The Option "forcelogout" is disabled.

Any Idea what i can do, to store the password?


Regards, Patrick
Average of ratings: -
In reply to Pia Liersch

Re: Login Password does not stored in the App

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Patrick, I dont know the answer to your problem, but just to claify, the password is never stored in the app. When you enter your username and password in the app, it is sent to the Moodle server, which generates a Web Service Token and sends that back to the app. The app stores this token and sends it to Moodle with every request to tell it which user you are.

It's possible that this token is being deleted or expired at the server end, so when the app sends the token it asks you to log in again. You could take a look at /admin/settings.php?section=webservicetokens to see if it has an entry for your user.

In reply to Mark Johnson

Re: Login Password does not stored in the App

by Pia Liersch -
Hi,

many thanks for your answer. Our Moodle store the token for the user, that is all correct.
We use to the config setting $CFG-> disablelogintoken = true; maybe this is our problem?

On our test system is everything ok, the same version and the same settings.
Or could it be, the other server configuration behind a proxy?

regards, patrick
In reply to Pia Liersch

Re: Login Password does not stored in the App

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't believe $CFG->disablelogintoken is related to web service tokens, its used for CSRF protection on the login form. If you're using a custom login form, you might have had to disable this for it to work.

In reply to Mark Johnson

Re: Login Password does not stored in the App

by Pia Liersch -
Ok, i found now some Error Entries, if someone try to reopen the Session.

  [Tue Aug 20 06:28:40 2019] [-:error] [client XXXXXXXXXXXXXXXX:47421] Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate
    value '2' found in column 'category'. in \n* line 1254 of /lib/dml/mysqli_native_moodle_database.php:
    call to debugging()\n* line 1400 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()\n* line 218 of /calendar/externallib.php: call to moodle_database->get_records_select()\n* line 1444 of /webservice/lib.php:
    call to core_calendar_external::get_calendar_events()\n* line 1290 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
[Tue Aug 20 06:28:42 2019] [-:error] [client XXXXXXXXXXXXXXXXX:47421] Default exception handler: Notwendiger Parameter "username" fehlt Debug: \nError code: missingparam\n* line 494 of /lib/setuplib.php: moodle_exception thrown\n* line 566 of /lib/moodlelib.php: call to print_error()\n* line 34 of /login/token.php: call to required_param()\n