System.Security.login¶
Description¶
Use this function to log in directly, avoiding the system's built-in login page.
Grammar¶
System.Security.login(username: string, password: string): Promise
- Parameter
username
password
- Return
Whether login succeeded.
Code Example¶
At the top of the page, there is a 'Switch User' button. Clicking the button opens the 'LoginPopup' popup. After the user enters their username and password and successfully login, the system automatically redirects to the project homepage.
Switch User Button Script

const result = await System.UI.openPopup('LoginPopup');
if (result === 'GoHomePage') {
System.UI.goHome();
}
