General
Login feature is very important when you want your users to login first before accessing the application screens.
Last updated
Login feature is very important when you want your users to login first before accessing the application screens.
Last updated
When you want the user to login into the account first before he enters the main screens, you should enable this feature. As an example, Web Portals, in which the dashboards and other screens are only visible after login.
Login section will help you decide authentication flow of your app. Here, you can decide
If you want to enable login for your app or not.
Do you want your users to first login and then see tab screens?
Do you want to keep users logged in every time they open the app?
Based on your selections, few options will gets enabled/disabled.
This is the most important part of the login process. Here, you need to add JavaScript which will help Twinr Framework identify login status of the user. Your script must return following four statuses.
loggedIn: This status means user is currently logged in and we allow them see post login screens.
notLoggedIn: This status means user is currently not logged in.
authError: This means user has entered wrong username and password.
unknown: This means auth status is currently unknown. This should be default status as well.
Status names must match exactly as mentioned above.
*NOTE: Do not copy the same. You have to find the selector from your website.
Understanding of above code:
You can test the login script on the browser's console. If the status it returns is correct, then you are good to go!
Here, give the elements we are asking for.
Login form selector: Enter the login form selector here.
Submit button selector: Enter login form submit button selector.
Username field selector: Enter username field selector.
Password field selector: Enter password field selector.