How to customize login?

vinu prasad picture vinu prasad · Nov 3, 2017 · Viewed 13.8k times · Source

I am using . I want to customize the login page in the . Is there any solution? Or it is good to create a new login page in instead of customizing the existing one.

Answer

Manoj VS picture Manoj VS · Dec 11, 2017

According to this link and this issue The following changes can be made to customize/ extend the existing the auth-pages/components in ngx-admin (without the npm dependency)

First Copy all source files from this repository folder to 'theme/components/auth' of your project

  1. in file core.module.ts change following imports:
import { NbAuthModule, NbDummyAuthStrategy } from '@nebular/auth'; 

to

import { NbAuthModule, NbDummyAuthStrategy } from '../@theme/components/auth'; // '@nebular/auth';
  1. in file app-routing.module.ts change following imports
import {
  NbAuthComponent,
  NbLoginComponent,
  NbLogoutComponent,
  NbRegisterComponent,
  NbRequestPasswordComponent,
  NbResetPasswordComponent,
} from '@nebular/auth';

to

import {
  NbAuthComponent,
  NbLoginComponent,
  NbLogoutComponent,
  NbRegisterComponent,
  NbRequestPasswordComponent,
  NbResetPasswordComponent,
} from './@theme/components/auth'; //'@nebular/auth'

4.in file theme.module.ts add following imports

// this line in import part of the file
import {NbAuthModule} from './components/auth';
import {NbPasswordAuthStrategy} from "./components/auth/strategies";

// inside of const NB_THEME_PROVIDERS
NbAuthModule.forRoot({
  providers: {
    email: {
      service: NbPasswordAuthStrategy,
      config: {},
    }
  }
}).providers,

References