Common Login For All THB development

Usage no npm install needed!

<script type="module">
  import thblogin from '';



The Login module for React. Initially built for use in internal projectTHB.

Latest Version 1.0.9-beta-1 🎉

React THB-Login 1.0.9-beta-1 is a complete rewrite, written in order to overCome Certain Common features in the internal projects.

Improvements include:

  • Flexible approach to data, with customisable functions
  • Extensible styling API with emotion
  • Component Injection API for complete control over the UI behaviour
  • Controllable state props and modular architecture

If you're interested in using this please contact the admin for approval, Approace THB Team

Installation and usage

The easiest way to use thbLogin is to install it from npm and build it into your app with Webpack.

npm install thblogin --save
yarn add thblogin

dependencies of modules reqd. . Please install this modules also

"@material-ui/core": "^3.6.2",
"aws-amplify": "1.1.7",
"aws-amplify-react": "2.1.1"

Then use it in your app:

import React, { Component } from 'react';
import './App.css';
import LoginContainer from 'thblogin';

class App extends Component {

    if(data.status === 'success'){
      let token = data.token; // you will get your token here on Successful login
      // now write your code here to redirect to another route eg. Dashboard
      let error = data.message; // error message

  render() {
    return (
      <div className="App">
          loginTitle={"THB Login DEMO"}  

export default App;

If you don't provide these props, you can set the initial value of the state they control:

  • loginTitle - set the initial Text of the Login Screen , DEFAult text is "Login"
  • loginLogo - set the initial Logo icon of the Login Screen, Default is Thb icon
  • onLoggedInComplete - to get the status of the error or success in the login Process.


Thb Licensed. Copyright (c) 2018. Use this under permmision of THB. To use it in your private project please ask for licence