Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with auth :( #4

Open
MarcusGV opened this issue Mar 8, 2019 · 1 comment
Open

Help with auth :( #4

MarcusGV opened this issue Mar 8, 2019 · 1 comment

Comments

@MarcusGV
Copy link

MarcusGV commented Mar 8, 2019

Hi, thanks a lot for sharing your webcomponents, Im trying to learn polymer3 and using your component, I get an error and cant find why :(, hope you can help me please :(

I create this simple component wich is importing yours :

`import {PolymerElement, html} from '@polymer/polymer/polymer-element';
import '@polymer/paper-button'
import './datos/firebase-app'
import './datos/firebase-auth'

class ComponenteP3 extends PolymerElement {
static get properties() {
return {

    }
}
static get template() {
    return html`
    <p>Probando componente</p>
    <firebase-app
    auth-domain="test-fff34.firebaseapp.com"
    database-url="https://test-fff34.firebaseio.com"
    api-key="AIzaSyDpHUzHxcF4XXpjbDUR0wJ-2OpobKrRUww"
    storage-bucket="test-fff34.appspot.com"
    messaging-sender-id="1049180123532">
  </firebase-app>
  
  <firebase-auth id="auth" user="{{user}}" provider="google" on-error="handleError">
  </firebase-auth>
  <paper-button raised on-click="autenticar">Autenticar</paper-button>
    `;
}

ready() {
    super.ready();
}

autenticar(){
    console.log('autenticando');
    this.$.auth.signInWithPopup()
    .then(function(response) {
      console.log('Logueado');
    })
    .catch(function(error) {
      console.log('Error al loguearse');
    });
}    

}

customElements.define('componente-p3', ComponenteP3);`

When I use it, I get this error, please, any suggestions?:
error

@iceflow19
Copy link
Owner

@MarcusGV Did it run without the polymerfire components?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants