text: (function () {
  
    'use strict';
  
    angular
      .module('app', ['auth0.lock', 'angular-jwt', 'ui.router'])
      .config(config);
  
    config.$inject = ['$stateProvider', 'lockProvider', '$urlRouterProvider', 'jwtOptionsProvider'];
  
    function config($stateProvider, lockProvider, $urlRouterProvider, jwtOptionsProvider) {
  
      $stateProvider
        .state('home', {
          url: '/home',
          controller: 'HomeController',
          templateUrl: 'components/home/home.html',
          controllerAs: 'vm'
        })
        .state('login', {
          url: '/login',
          controller: 'LoginController',
          templateUrl: 'components/login/login.html',
          controllerAs: 'vm'
        })
        .state('admin', {
          url: '/admin',
          controller: 'AdminController',
          templateUrl: 'components/admin/admin.html',
          controllerAs: 'vm'
        });
  
      lockProvider.init({
        clientID: AUTH0_CLIENT_ID,
        domain: AUTH0_DOMAIN,
        options: {
          _idTokenVerification: false
        }
      });
  
      $urlRouterProvider.otherwise('/home');
  
      // Configuration for angular-jwt
      jwtOptionsProvider.config({
        tokenGetter: ['options', function (options) {
          if (options && options.url.substr(options.url.length - 5) == '.html') {
            return null;
          }
          return localStorage.getItem('id_token');
        }],
        whiteListedDomains: ['localhost'],
        unauthenticatedRedirectPath: '/login'
      });
  
    }
  
  })();
  
  