0
私はfirefoxベースの認証要素がpolymerfireを使用している場合、ユーザー属性をグローバルに使用するにはどうすればよいでしょうか?例えばPolymerfire auth globallyを使用
私は、ログインボタンを持つ要素がある場合:
<dom-module id="tab-b">
<template>
<style>
</style>
<firebase-app auth-domain="example.firebaseapp.com"
database-url="example.firebaseio.com/"
api-key="">
</firebase-app>
<firebase-auth id="auth" location="{{location}}" user="{{user}}"provider="google" on-error="handleError">
</firebase-auth>
<paper-button id="googSignIn" class$="signInButton {{_getMiniClass()}}"on-tap="login" raised>
Google
</paper-button>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'tab-b',
properties:{
user: {
type: Object
},
statusKnown: {
type: Object
}
},
login: function(){
return this.$.auth.signInWithPopup();
},
logout: function(){
return this.$.auth.signOut();
}
});
})();
</script>
</dom-module>
をそして私はこのような多くのコンポーネントを表示または非表示にする:
<element show$={{!user}}><element>
にオブジェクト:' firebase-auth> ' –