Force authentication prompt when changing sites

Re: Force authentication prompt when changing sites

by Dani Palou -
Number of replies: 3
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Logan,

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.

Kind regards,

Dani

In reply to Dani Palou

Re: Force authentication prompt when changing sites

by Logan Thomison -

Hi Dani,

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.

Logan 

In reply to Logan Thomison

Re: Force authentication prompt when changing sites

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Logan,

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.

Kind regards,

Dani