<commit_before><link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<link rel="import" href="../../bower_components/paper-fab/paper-fab.html">
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html">



<dom-module id="app-auth">
  <template>
    <style include="shared-styles">
      :host {
        display: block;

        padding: 10px;
      }
      
    </style>

        <firebase-auth id="auth" user="{{user}}" on-error="handleError" statusKnown="{{statusKnown}}">
        </firebase-auth>


        <paper-input id="email" label="email"></paper-input>
        <paper-input id="password" label="password"></paper-input>
        <paper-button id="btnLogin" on-tap="login">Log in</paper-button>
        <paper-button id="btnSignup" on-tap="signup">Sign Up</paper-button>
        <paper-button id="btnLogout" on-tap="logout">Log Out</paper-button>
        <paper-button  on-tap="login2" hidden>Admin</paper-button>
         <paper-button on-tap="login3" hidden>prova</paper-button>
        <paper-button  on-tap="googleLogin" hidden>google login</paper-button>
        <div id="userEmail">Connected user: {{user.email}}</div>
        <div id="userUid" hidden>{{user.uid}}</div>

    </template>

  <script>
    Polymer({
      is: 'app-auth',

      properties: {
        email: {type: String},
        password: {type: String},
        user: {type: Object,notify:true, observer: '_userChangeHandler'}
      },

      login: function(){
          console.log('log in');

          var email = this.$.email.value;
          var password = this.$.password.value;
          
          this.$.auth.signInWithEmailAndPassword(email, password);
      },

      signup: function(){
          console.log('SIGN up');
          
          var email = this.$.email.value;
          var password = this.$.password.value;
          this.$.auth.createUserWithEmailAndPassword(email, password);
      },

      logout: function(){
          console.log('log out');
          this.$.auth.signOut();
      },

      login2: function(){
          this.$.auth.signInWithEmailAndPassword("<EMAIL>", "<EMAIL>");
      },

       login3: function(){
          this.$.auth.signInWithEmailAndPassword("<EMAIL>va.<EMAIL> <EMAIL>", "<PASSWORD>");
      },

      googleLogin: function(){
          this.$.auth.signInWithPopup("google");
      },

      handleError: function(e){
          console.log(e);
      },<commit_msg>minor changes<commit_after><link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<link rel="import" href="../../bower_components/paper-fab/paper-fab.html">
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html">



<dom-module id="app-auth">
  <template>
    <style include="shared-styles">
      :host {
        display: block;

        padding: 10px;
      }
      
    </style>

        <firebase-auth id="auth" user="{{user}}" on-error="handleError" statusKnown="{{statusKnown}}">
        </firebase-auth>


        <paper-input id="email" label="email"></paper-input>
        <paper-input id="password" label="password"></paper-input>
        <paper-button id="btnLogin" on-tap="login">Log in</paper-button>
        <paper-button id="btnSignup" on-tap="signup">Sign Up</paper-button>
        <paper-button id="btnLogout" on-tap="logout">Log Out</paper-button>
        <paper-button  on-tap="login2" hidden>Admin</paper-button>
         <paper-button on-tap="login3" hidden>prova</paper-button>
        <paper-button  on-tap="googleLogin" hidden>google login</paper-button>
        <div id="userEmail">Connected user: {{user.email}}</div>
        <div id="userUid" hidden>{{user.uid}}</div>

    </template>

  <script>
    Polymer({
      is: 'app-auth',

      properties: {
        email: {type: String},
        password: {type: String},
        user: {type: Object,notify:true, observer: '_userChangeHandler'}
      },

      login: function(){
          var email = this.$.email.value;
          var password = this.$.password.value;
          
          this.$.auth.signInWithEmailAndPassword(email, password);
          console.log('log in');

      },

      signup: function(){
          var email = this.$.email.value;
          var password = this.$.password.value;
          this.$.auth.createUserWithEmailAndPassword(email, password);
          console.log('SIGN up');
      },

      logout: function(){
          console.log('log out');
          this.$.auth.signOut();
      },

      login2: function(){
          this.$.auth.signInWithEmailAndPassword("<EMAIL>", "<EMAIL>");
      },

       login3: function(){
          this.$.auth.signInWithEmailAndPassword("<EMAIL>", "<PASSWORD>");
      },

      googleLogin: function(){
          this.$.auth.signInWithPopup("google");
      },

      handleError: function(e){
          console.log(e);
      },
{'fraction_non_alphanumeric': 0.1786634939520127, 'fraction_numerical': 0.002379535990481856, 'mean_word_length': 2.5149825783972126, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, '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': '908526', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1500, 'n_words': 250}