<commit_before>import './login.less';

import angular from 'angular';
import uiRouter from 'angular-ui-router';
import templateUrl from './login.html';

class Login {
    constructor($state, Auth) {
        this.$state = $state;
    }
    login() {
        var vm = this;
        this.auth.$signInWithEmailAndPassword('<EMAIL>', 'password').then(function(firebaseUser) {
            vm.state = 'Signed in as:' + firebaseUser.uid;
            vm.$state.go('leaderboard');
        }).catch(function(error) {
            vm.state = 'Authentication failed:' + error;
        });
    }
    signInWith(provider) {
        var vm = this;
        this.auth.$signInWithPopup(provider).then(function(firebaseUser) {
            vm.state = 'Signed in as:' + firebaseUser.uid;
            vm.$state.go('leaderboard');
        }).catch(function(error) {
            vm.state = 'Authentication failed:' + error;
        });
    }
}
const name = 'login';
export default angular.module(name, [uiRouter])
    .component(name, {
        templateUrl,
        controller: ['$state', 'Auth', Login],<commit_msg>add Auth to the ctrl<commit_after>import './login.less';

import angular from 'angular';
import uiRouter from 'angular-ui-router';
import templateUrl from './login.html';

class Login {
    constructor($state, Auth) {
        this.$state = $state;
        this.Auth = Auth;
    }
    login() {
        var vm = this;
        this.auth.$signInWithEmailAndPassword('<EMAIL>', 'password').then(function(firebaseUser) {
            vm.state = 'Signed in as:' + firebaseUser.uid;
            vm.$state.go('leaderboard');
        }).catch(function(error) {
            vm.state = 'Authentication failed:' + error;
        });
    }
    signInWith(provider) {
        var vm = this;
        this.Auth.$signInWithPopup(provider).then(function(firebaseUser) {
            vm.state = 'Signed in as:' + firebaseUser.uid;
            vm.$state.go('leaderboard');
        }).catch(function(error) {
            vm.state = 'Authentication failed:' + error;
        });
    }
}
const name = 'login';
export default angular.module(name, [uiRouter])
    .component(name, {
        templateUrl,
        controller: ['$state', 'Auth', Login],
{'fraction_non_alphanumeric': 0.15228197017623135, 'fraction_numerical': 0.0, 'mean_word_length': 2.464788732394366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1764021', 'n_tokens_mistral': 645, 'n_tokens_neox': 644, 'n_words': 137}