Manual:$wgExtendedLoginCookies/en

Dictates when the extended lifetime login cookies expire.

Default login cookie lifetime, in seconds. Setting $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make login cookies session-only.

Example
To make login cookies session-only, you can use: