ExtJS 5 Simple Login System Example

Description

Professional Ext applications require users to login. This example shows how to get logged-in user data from the server before the application actually starts and how to require user to login.
Open in new window

Main Features

  • uses custom startup sequence
  • stores user data in private variables
  • uses View Model to two-way bind login form fields
  • protects from command line startup attempts
  • reloads the application on logout
  • uses custom Ext error handler (test by typing XLogin.startApp()) in the console

Use Cases

You can use this example as the basis of your login system when developing an application that requires login. However, you need to implement your security measures as the example does not focus on security. See the comments in the source code that explain where to implement your security implementation.

Example Files (relative to example root)

The example has been initially generated with sencha generate app so the following list contains only added or edited files:
1
2
3
4
5
app.js
 
app/Application.js
app/Setup.js
app/view/LoginView.js

Source Code

If you want to see the example code, login or sign-up. Free membership is available.
  • Author
  • Recent Posts
Follow me:
saki
I'm a well seasoned developer, consultant and educator of web applications based mainly on Sencha libraries, PHP, MySQL and Node.js. Besides (Apple) computers, I love photography and mountain biking.
Follow me:
Latest posts by saki (see all)
  • Ext, Angular, React, and Vue - June 27, 2019
  • The Site Resurgence - February 11, 2018
  • Configuring ViewModel Hierarchy - June 19, 2015