<commit_before>import { EventEmitter } from 'events';
import Auth0Lock from 'auth0-lock';
import { browserHistory } from 'react-router';

export default class AuthService extends EventEmitter {
  constructor(clientId, domain) {
    super();
    // Configure Auth0
    this.lock = new Auth0Lock(clientId, domain, {
      auth: {
        redirectUrl: 'https://fierce-cove-58460.herokuapp.com/',
        responseType: 'token',
      },
      languageDictionary: {
        title: 'Real Estate Management'
      }
    });
    // Add callback for lock `authenticated` event
    this.lock.on('authenticated', this._doAuthentication.bind(this));
    // binds login functions to keep this context
    // this.lock.on('authorization_error', this._authorizationError.bind(this));
    this.login = this.login.bind(this);
  }

  _doAuthentication(authResult) {
    // Saves the user token<commit_msg>Change autho redirect to heroku<commit_after>import { EventEmitter } from 'events';
import Auth0Lock from 'auth0-lock';
import { browserHistory } from 'react-router';

export default class AuthService extends EventEmitter {
  constructor(clientId, domain) {
    super();
    // Configure Auth0
    this.lock = new Auth0Lock(clientId, domain, {
      auth: {
        redirectUrl: 'https://fierce-cove-58460.herokuapp.com/',
        responseType: 'token',
      },
      languageDictionary: {
        title: 'Real Estate Dashboard'
      }
    });
    // Add callback for lock `authenticated` event
    this.lock.on('authenticated', this._doAuthentication.bind(this));
    // binds login functions to keep this context
    // this.lock.on('authorization_error', this._authorizationError.bind(this));
    this.login = this.login.bind(this);
  }

  _doAuthentication(authResult) {
    // Saves the user token
{'fraction_non_alphanumeric': 0.12060301507537688, 'fraction_numerical': 0.010050251256281407, 'mean_word_length': 3.2565320665083135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7523839', 'n_tokens_mistral': 528, 'n_tokens_neox': 519, 'n_words': 125}