Moodle for mobile

Username and password

Picture of Swanand Taware
Username and password

Hi All,

I am using the mobile app for past 6 months and as a developer, I started to modify some functionality for my moodle site.

Actually, I was looking at the code but not able to find how login system works in the mobile app. It only asks the first time to log in. Then onwards it directly login your account automatically to access the courses. 

I have managed to store userid and password to local storage by adding simple code in credentials.js 

localStorage.setItem("moodleUserName", username);
localStorage.setItem("moodleUserPass", password);

I know it is not the right way but I am not able to find user id and password every time. 

Can anyone please help with this?

Thanks in advance!
Average of ratings: -
Picture of Juan Leyva
Re: Username and password
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

The app uses Web Service tokens for authentication and calling Web Services, is a very bad idea to store locally the username and password.

What are you trying to achieve?

Average of ratings: -