Datta Able PRO Flask - OAuth, Reset Password, Secured API

Latest updates of Datta Flask PRO: OAuth via Twitter and Github, extended user profiles, change password component, improved UI/UX.

Flask Datta Able - Premium seed project
Flask Datta Able - Premium seed project

Hello! This article presents the latest updates of Flask Datta Able PRO, a premium seed project built on top of a modern Bootstrap 5 design from CodedThemes. The starter now provides OAuth via Twitter and Github, API, improved authentication flow, extended profile for users, and optimized Docker scripts.

Thanks for reading!

✨ Improved Authentication

  • ✅ Password strength checker (on registration page)
  • ✅ Automatic users suspension on consecutive failed logins

In this version, the registration form has been improved to suggest to the user the password strength, a hide/unhide password control plus a copy password control for the password confirmation field.

Flask Datta PRO - Password Checker
Flask Datta PRO - Password Checker

Another useful feature is the automatic user suspension on consecutive failed logins, using a limit saved in the configuration.

Flask Datta PRO - User Suspension
Flask Datta PRO - User Suspension

✨ OAuth via Twitter and Github

The social login is optional and the app enables the authentication buttons on the Sign IN page if detects the OAuth secrets in the .env file. For instance, if the end project requires only the Github social login, this requires only adding in the .env Github OAuth credentials (ID, and SECRET):

# Sample .env (truncated content)

...

# SOCIAL AUTH Github
GITHUB_ID=<YOUR_GH_ID>            <-- new lines
GITHUB_SECRET=<YOUR_GH_SECRET>    <-- new lines

...

Once the application is restarted, the Github login button should be visible on the page:

Flask Datta PRO - OAuth via Github
Flask Datta PRO - OAuth via Github

For Twitter, the set up is identical and both providers can be used at the same time.


✨ Admin ROLE

This privileged user, created using the CLI, is able to manage all app users, edit their information, and suspend or unsuspend using a simple and intuitive UI. Admins are able to do the following:

  • ✅ View all registered users, search and paginate the view
  • ✅ Edit existing user's information
  • ✅ Suspend/unsuspend
  • ✅ Delete users (action requires confirmation)
Flask Datta PRO - Admin ROLE
Flask Datta PRO - Admin ROLE

The users list view is restricted to admins, the ordinary users (created via the registration page) are able to edit only their own profile.


✨ Extended users profile

In this version, the profile page has been redesigned to provide two more features:

  • ✅ Change Password Component
  • ✅ Self-account deletion (with confirmation)

On top of this, the existing profile page is now cleaner and more intuitive.

Flask Datta PRO - User profile page
Flask Datta PRO - User profile page

Another requested feature is the password reset component, accessible on the same page.

Flask Datta PRO - Update Password Component
Flask Datta PRO - Update Password Component
Self Deletion Component - action requires confirmation
Flask Datta PRO - Account Self Deletion
Flask Datta PRO - Account Self Deletion

✨API via Flask-RestX

This module provides an API over two correlated models (products, sales) defined in the apps/models file. This new service, secured using a TOKEN generated during the registration process, can be used using the native Swagger UI shipped with the product or using any 3rd party tool like POSTMAN.

Flask Datta PRO - API interface via Flask-RestX
Flask Datta PRO - API interface via Flask-RestX

✨ Persistent Dark-Mode (UI/UX)

In this version of the product, the Dark/Light mode remains persistent to the user session (state is saved using the browser's local storage).

Flask Datta PRO - Persistent Dark Mode
Flask Datta PRO - Persistent Dark Mode

✨Improved Docker Scripts

The product, once downloaded, can be started using a single command (make sure you are at the root of the project), without any other edits or configurations. By default, the SQLite persistence is used, but the transition to MySql is quite simple.

$ docker-compose up --build 

Once the above command is executed, the app should be available in the browser.

Flask Datta PRO - Start in Docker
Flask Datta PRO - Start in Docker

✨ Resources

Thanks for reading! As usual, a new release comes with a discount applicable to all licenses, available for a limited number of licenses.

datta20off - the coupon to be used during check out for 20%Off

For more information, feel free to access the product page or chat with the support team (24/7 LIVE service) via Email and Discord.