Difference between revisions of "Customizing the Login Page"

From Lianjapedia
Jump to: navigation, search
(Created page with "''Under Construction'' ==Overview== The login page can be customized for Web, Tablet, Phone and Electron Apps. For Desktop Apps, see Command Line Switches. ==Web Apps=...")
 
(One-Time Passcode Two Factor Authentication)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''Under Construction''
 
 
 
==Overview==
 
==Overview==
 
The login page can be customized for Web, Tablet, Phone and Electron Apps.  
 
The login page can be customized for Web, Tablet, Phone and Electron Apps.  
Line 20: Line 18:
 
'''macOS'''
 
'''macOS'''
  
<pre>/usr/local/lianja/cloudserver/tenants/public/wwwroot/</pre>
+
Prior to v6.0:
 +
<pre>/usr/local/lianja/server/wwwroot/</pre>
 +
 
 +
From v6.0:
 +
<pre>/Users/Shared/Lianja/cloudserver/tenants/public/wwwroot/</pre>
  
 
The default file is specified in the [[Lianja_Server_Manager_on_Windows#HTTP_Settings|HTTP Settings]] in the Server Manager on Windows or in the environment variable DB_WWWDEFAULT on [[Lianja_Server_Manager_on_Linux#Configuration|Linux]] and [[Lianja_Server_Manager_on_Mac#Configuration|macOS]].
 
The default file is specified in the [[Lianja_Server_Manager_on_Windows#HTTP_Settings|HTTP Settings]] in the Server Manager on Windows or in the environment variable DB_WWWDEFAULT on [[Lianja_Server_Manager_on_Linux#Configuration|Linux]] and [[Lianja_Server_Manager_on_Mac#Configuration|macOS]].
Line 26: Line 28:
 
You can customize your own by copying the default files and editing them to brand them.
 
You can customize your own by copying the default files and editing them to brand them.
  
==PhoneGap Apps==
+
==Mobile Apps==
  
The default login_phone.html, login_phone_recaptcha.html, login_tablet.html and login_tablet_recaptcha.html files used for PhoneGap Apps reside in:
+
The default login_phone.html and login_tablet.html files used for mobile Apps reside in:
  
 
'''Windows'''
 
'''Windows'''
Line 40: Line 42:
 
'''macOS'''
 
'''macOS'''
  
 +
Prior to v6.0:
 
<pre>/usr/local/lianja/library/mobilelogin/</pre>
 
<pre>/usr/local/lianja/library/mobilelogin/</pre>
 +
 +
From v6.0:
 +
<pre>/Users/Shared/Lianja/library/mobilelogin/</pre>
  
 
When generating code for the mobile App, if these files exist in the app directory they will be used instead.  You can customize your own by copying the default files and editing them to brand them.
 
When generating code for the mobile App, if these files exist in the app directory they will be used instead.  You can customize your own by copying the default files and editing them to brand them.
Line 58: Line 64:
 
'''macOS'''
 
'''macOS'''
  
 +
Prior to v6.0:
 
<pre>/usr/local/lianja/library/mobilelogin/</pre>
 
<pre>/usr/local/lianja/library/mobilelogin/</pre>
 +
 +
From v6.0:
 +
<pre>/Users/Shared/Lianja/library/mobilelogin/</pre>
  
 
When generating code for the Electron App, if these files exist in the app directory they will be used instead. You can customize your own by copying the default files and editing them to brand them.
 
When generating code for the Electron App, if these files exist in the app directory they will be used instead. You can customize your own by copying the default files and editing them to brand them.
  
 
==reCAPTCHA==
 
==reCAPTCHA==
Google reCAPTCHA was added to Web and Mobile login pages in Lianja v4.1.
+
Google reCAPTCHA is displayed on the Web login page if enabled in the Lianja Server.
  
 
[[{{ns:file}}:recaptcha1.png|800px|left|link={{filepath:recaptcha1.png}}|Google reCAPTCHA]]
 
[[{{ns:file}}:recaptcha1.png|800px|left|link={{filepath:recaptcha1.png}}|Google reCAPTCHA]]
Line 71: Line 81:
 
<br clear=all>
 
<br clear=all>
  
The reCAPTCHA can be enabled or disabled in the [[Lianja_Server_Manager_on_Windows#HTTP_Settings|HTTP Settings]] in the Server Manager on Windows or by setting the environment variable DB_WWWRECAPTCHA on [[Lianja_Server_Manager_on_Linux#Configuration|Linux]] and [[Lianja_Server_Manager_on_Mac#Configuration|macOS]].
+
The reCAPTCHA can be enabled or disabled in the [[Lianja_Server_Manager_on_Windows#Security|Security Settings]] in the Server Manager on Windows or by setting the environment variable DB_WWWRECAPTCHA on [[Lianja_Server_Manager_on_Linux#Configuration|Linux]] and [[Lianja_Server_Manager_on_Mac#Configuration|macOS]].
  
==Authenticating and Running a Specific Web App==
+
==Authenticating and Bypassing the App Center==
There are occasions that you want to login and run an App directly without having to go through the App Center.  From Lianja v4.1 you can do this.
+
There are occasions that you want to login and run an App directly without having to go through the App Center.
  
 
For example, put this in the browser address bar (or an href in a link).
 
For example, put this in the browser address bar (or an href in a link).
Line 94: Line 104:
 
<pre>http://localhost:8001/login.rsp?file=myreport.rsp&args=arglist.....</pre>
 
<pre>http://localhost:8001/login.rsp?file=myreport.rsp&args=arglist.....</pre>
  
[[Category:Lianja v4.1]]
+
===loginapp===
 +
From v9.0, including the ''loginapp=<appname>'' value pair in the [[Users and Roles|roles list for a user]] will open the App specified in <appname> when that user logs in instead of displaying the App Center, e.g. <pre>loginapp=form2,public</pre>
 +
 
 +
==Customizing using the tenant_config.js file==
 +
From v5.2 the ''tenant_config.js'' file can also be used to customize the appearance of the login and App Center pages.  It can include customizations such as the header icon and text, background images and captions.
 +
 
 +
An example file is included in the distribution as ''_tenant_config.js'' - just remove the leading '_' to test its effects.
 +
 
 +
'''Windows'''
 +
 
 +
<pre>C:\lianja\cloudserver\tenants\public\wwwroot\tenant_config.js</pre>
 +
 
 +
'''Linux'''
 +
 
 +
<pre>/opt/lianja/cloudserver/tenants/public/wwwroot/tenant_config.js</pre>
 +
 
 +
'''macOS'''
 +
 
 +
<pre>/Users/Shared/Lianja/cloudserver/tenants/public/wwwroot/tenant_config.js</pre>
 +
 
 +
==One-Time Passcode Two Factor Authentication==
 +
From v8.0, two factor authentication (2FA) is supported for the Lianja Cloud / Lianja Cloud Server via the sending of a one-time passcode (OTP).
 +
 
 +
To enable 2FA on the server, check the 'Enable 2FA' box in the [[Lianja_Server_Manager_on_Windows#Security|Lianja Server Manager Security tab]] on Windows or set the environment variable DB_2FA_ENABLED to 'true' on [[Lianja Server Manager on Linux|Linux]] or [[Lianja Server Manager on Mac|macOS]].
 +
 
 +
When a user logs in, if they have an email address specified in their [[Users_and_Roles#Users_and_Roles|user record]], they will be sent 6-digit OTP to complete their login.  If the user record contains more than one email address, the OTP will be sent to all the email addresses.
 +
 
 +
The OTP is valid for five minutes and must be entered on the login page.
 +
 
 +
[[{{ns:file}}:l8_2fa1.png|800px|left|link={{filepath:l8_2fa1.png}}|2 Factor Authentication]]
 +
<br clear=all>
 +
 
 
[[Category:Lianja_Cloud_Server]]
 
[[Category:Lianja_Cloud_Server]]
 
[[Category:Electron_Apps]]
 
[[Category:Electron_Apps]]
[[Category:PhoneGap_Apps]]
+
[[Category:Mobile Apps]]
 
[[Category:Developers Guide]]
 
[[Category:Developers Guide]]
 +
[[Category:Deployment]]
 +
[[Category:Lianja v4.1]]
 +
[[Category:Lianja v5.2]]
 +
[[Category:Lianja v6.0]]
 +
[[Category:Lianja v8.0]]
 +
[[Category:Lianja v9.0]]

Latest revision as of 08:22, 6 March 2023

Overview

The login page can be customized for Web, Tablet, Phone and Electron Apps.

For Desktop Apps, see Command Line Switches.

Web Apps

The default login.rsp and login_recaptcha.rsp (run when reCAPTCHA is enabled) files for Web Apps reside in:

Windows

C:\lianja\cloudserver\tenants\public\wwwroot\

Linux

/opt/lianja/cloudserver/tenants/public/wwwroot/

macOS

Prior to v6.0:

/usr/local/lianja/server/wwwroot/

From v6.0:

/Users/Shared/Lianja/cloudserver/tenants/public/wwwroot/

The default file is specified in the HTTP Settings in the Server Manager on Windows or in the environment variable DB_WWWDEFAULT on Linux and macOS.

You can customize your own by copying the default files and editing them to brand them.

Mobile Apps

The default login_phone.html and login_tablet.html files used for mobile Apps reside in:

Windows

C:\lianja\library\mobilelogin\

Linux

/opt/lianja/library/mobilelogin/

macOS

Prior to v6.0:

/usr/local/lianja/library/mobilelogin/

From v6.0:

/Users/Shared/Lianja/library/mobilelogin/

When generating code for the mobile App, if these files exist in the app directory they will be used instead. You can customize your own by copying the default files and editing them to brand them.

Electron Apps

The default login_web.html and login_web_recaptcha.html files used by Electron reside in:

Windows

C:\lianja\library\mobilelogin\

Linux

/opt/lianja/library/mobilelogin/

macOS

Prior to v6.0:

/usr/local/lianja/library/mobilelogin/

From v6.0:

/Users/Shared/Lianja/library/mobilelogin/

When generating code for the Electron App, if these files exist in the app directory they will be used instead. You can customize your own by copying the default files and editing them to brand them.

reCAPTCHA

Google reCAPTCHA is displayed on the Web login page if enabled in the Lianja Server.

Google reCAPTCHA


Google reCAPTCHA


The reCAPTCHA can be enabled or disabled in the Security Settings in the Server Manager on Windows or by setting the environment variable DB_WWWRECAPTCHA on Linux and macOS.

Authenticating and Bypassing the App Center

There are occasions that you want to login and run an App directly without having to go through the App Center.

For example, put this in the browser address bar (or an href in a link).

http://localhost:8001/login.rsp?app=example_webapp1

or login, run an App and go to a specific page.

http://localhost:8001/login.rsp?app=example_webapp1&page=sales

This enhancement provides the ability to use the reCAPTCHA login page to authenticate, setup the correct roles and permissions and then navigate to the specified app.

You can also authenticate and run a .rsp page. For example, where myreport.rsp resides in the library directory:

http://localhost:8001/login.rsp?file=myreport.rsp

You can pass arguments like this:

http://localhost:8001/login.rsp?file=myreport.rsp&args=arglist.....

loginapp

From v9.0, including the loginapp=<appname> value pair in the roles list for a user will open the App specified in <appname> when that user logs in instead of displaying the App Center, e.g.
loginapp=form2,public

Customizing using the tenant_config.js file

From v5.2 the tenant_config.js file can also be used to customize the appearance of the login and App Center pages. It can include customizations such as the header icon and text, background images and captions.

An example file is included in the distribution as _tenant_config.js - just remove the leading '_' to test its effects.

Windows

C:\lianja\cloudserver\tenants\public\wwwroot\tenant_config.js

Linux

/opt/lianja/cloudserver/tenants/public/wwwroot/tenant_config.js

macOS

/Users/Shared/Lianja/cloudserver/tenants/public/wwwroot/tenant_config.js

One-Time Passcode Two Factor Authentication

From v8.0, two factor authentication (2FA) is supported for the Lianja Cloud / Lianja Cloud Server via the sending of a one-time passcode (OTP).

To enable 2FA on the server, check the 'Enable 2FA' box in the Lianja Server Manager Security tab on Windows or set the environment variable DB_2FA_ENABLED to 'true' on Linux or macOS.

When a user logs in, if they have an email address specified in their user record, they will be sent 6-digit OTP to complete their login. If the user record contains more than one email address, the OTP will be sent to all the email addresses.

The OTP is valid for five minutes and must be entered on the login page.

2 Factor Authentication