Username and password

Username and password

ved Swanand Taware -
Antal besvarelser: 1

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!
 
Gennemsnitsbedømmelse: -
I svar til Swanand Taware

Re: Username and password

ved Juan Leyva -
Billede af Core developers Billede af Moodle HQ Billede af Plugin developers Billede af Testers

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?