Custom external login form

The following is a PHP code snippet that displays a login form which provides feedback without showing the FileRun login screen. This can be used if you would like to have a custom login form integrated into your website and bypass the FileRun login screen.

if ($_GET[['feedback']]) {
     echo base64_decode($_GET[['feedback']]);
<form method="post" action="URL-OF-FILERUN/?page=login&action=login&nonajax=1">
	<input type="hidden" name="redirectAfterLogin" value="<?php echo base64_encode("URL-OF-FILERUN-OR-WELCOME-PAGE") ?>">
	<input type="hidden" name="redirectOnFailure" value="<?php echo base64_encode("URL-OF-PAGE-HOSTING-THIS-FORM?") ?>">
	<label for="usr">Username:</label>
	<input type="text" name="username" value="" id="usr"/>
	<label for="pass">Password:</label>
	<input type="password" name="password" value="" id="pass" />
	<input type="submit" value="Login">

You will need to replace the following placeholders: URL-OF-FILERUN, URL-OF-PAGE-HOSTING-THIS-FORM (leave the question mark at its end) and URL-OF-FILERUN-OR-WELCOME-PAGE.

You can also make the login Ajax-based, in which case the HTTP request is identical, but the target URL should not contain the &nonajax=1 part. The server response will then be in JSON format.

Note: This does not work for users with 2-Factor-Authentication enabled.