Is it possible to force a password prompt when switching sites? I have a use case that includes using the app in a shared environment so the Change Site is really more of a Change User. I would like to present the user to reauthenticate in some capacity when the select their account.
if your site is 3.2 or higher, you can achieve this by going to Site administration > Mobile app > Mobile features. You'll see a "Force log out" setting in there. If you enable it, the users will have to input the password everytime they access your site.
If your site is older you can achieve the same behaviour by installing the plugin Moodle Mobile additional features. In this case the setting is in Site administration > Plugins > Local plugins > Moodle Mobile additional features.
Thanks for the response. Is there a timeout associated with it? I'd like to force the user to authenticate after something like 15 minutes of inactivity.
this logout only happens if the user clicks to "Logout" using the side menu, there is no timeout associated.
The only way to achieve a timeout is by changing the expiration time for the user tokens. I don't know how it's done, I was told it's only possible by changing the code, there is no admin option for that. If you check the database table "external_tokens" you will see they have a "validuntil" field.
When the token expires, most actions in the app will require the user to input the password again. There are some actions that can be done even if the token is expired, this is because the WebServices that perform the actions are old and don't check it.
I'll give it a look. Thanks