<commit_before>angular.module('starter.controllers', ['ng-token-auth'])

.config(function($authProvider) {
  $authProvider.configure({
    apiUrl: 'http://localhost:3000' //your api's url
  });
})

.controller('AppCtrl', function($scope, $ionicModal, $auth) {
  // Form data for the login modal
  $scope.loginData = {};

  // Create the login modal that we will use later
  $ionicModal.fromTemplateUrl('templates/login.html', {
    scope: $scope
  }).then(function(modal) {
    $scope.modal = modal;
  });

  // Triggered in the login modal to close it
  $scope.closeLogin = function() {
    $scope.modal.hide();
  };

  // Open the login modal
  $scope.showLogin = function() {
    $scope.modal.show();
  };

  //OAUTH SIGN IN
  $scope.login = function() {
    $auth.authenticate('google')
    .then(function(resp) {
      $scope.user = resp;
      $scope.activeSession = true;
    })
    .catch(function(resp) {
      console.log("error")
    });
  };


  // //OAUTH SIGN OUT
  $scope.logout= function() {
    $auth.signOut()
    .then(function(resp) {
      $scope.activeSession = false;
      console.log("WUNDABAR!!!")
    })
    .catch(function(resp) {
      console.log("SOMETHING TERRIBLE HAS HAPPENED")
    });
  };
})<commit_msg>Stopping point for the day; add pseudocode for dealing with text verification process<commit_after>angular.module('starter.controllers', ['ng-token-auth'])

.config(function($authProvider) {
  $authProvider.configure({
    apiUrl: 'http://localhost:3000' //your api's url
  });
})

.controller('AppCtrl', function($scope, $ionicModal, $auth) {
  // Form data for the login modal
  $scope.loginData = {};

  // Create the login modal that we will use later
  $ionicModal.fromTemplateUrl('templates/login.html', {
    scope: $scope
  }).then(function(modal) {
    $scope.modal = modal;
  });

  // Triggered in the login modal to close it
  $scope.closeLogin = function() {
    $scope.modal.hide();
  };

  // Open the login modal
  $scope.showLogin = function() {
    $scope.modal.show();
  };

  //OAUTH SIGN IN
  $scope.login = function() {
    $auth.authenticate('google')
    .then(function(resp) {
      $scope.user = resp;
      // if (resp.phone_number) {
      $scope.activeSession = true;
      // } else {
        // display the page/modal where they enter their phonenumber
        // on that modal, have a button that hits the send_verification_code route
        // then next modal, have a button that hits the verify_code route
        // then the backend needs to save the phone number as valid, ELSE this modal redisplays with errors
      // }
    })
    .catch(function(resp) {
      console.log("error")
    });
  };


  // //OAUTH SIGN OUT
  $scope.logout= function() {
    $auth.signOut()
    .then(function(resp) {
      $scope.activeSession = false;
      console.log("WUNDABAR!!!")
    })
    .catch(function(resp) {
      console.log("SOMETHING TERRIBLE HAS HAPPENED")
    });
  };
})
{'fraction_non_alphanumeric': 0.15473362741771293, 'fraction_numerical': 0.0027146250424160165, 'mean_word_length': 2.848563968668407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2448054', 'n_tokens_mistral': 968, 'n_tokens_neox': 937, 'n_words': 224}