|
1 | 1 | <link rel="import" href="../polymer/polymer.html">
|
2 | 2 |
|
3 |
| -<link rel="import" href="../akc-meta/akc-meta.html"> |
| 3 | +<link rel="import" href="../iron-meta/iron-meta.html"> |
4 | 4 | <link rel="import" href="../paper-toast/paper-toast.html">
|
5 | 5 |
|
6 | 6 | <link rel="import" href="../polymerfire/firebase-auth.html">
|
|
20 | 20 | -->
|
21 | 21 | <dom-module id="firebase-auth-manager">
|
22 | 22 | <template>
|
23 |
| - <akc-meta key="logged" value="[[_logged]]"></akc-meta> |
| 23 | + <iron-meta key="logged" value="[[_logged]]"></iron-meta> |
24 | 24 | <!-- TODO PG: check if we can switch this to 2 way-data binding if we solved the query issue... -->
|
25 |
| - <akc-meta key="user" value="[[_deepClone(_user)]]"></akc-meta> |
26 |
| - <!-- akc-meta is not compatible with the user object from firebase --> |
27 |
| - <akc-meta key="profile" value="[[_profile]]"></akc-meta> |
28 |
| - <akc-meta key="profilePath" value="[[_profilePath]]"></akc-meta> |
29 |
| - <akc-meta key="appName" value="[[appName]]"></akc-meta> |
| 25 | + <iron-meta key="user" value="{{_user}}"></iron-meta> |
| 26 | + <iron-meta key="profile" value="{{_profile}}"></iron-meta> |
| 27 | + <iron-meta key="profilePath" value="{{_profilePath}}"></iron-meta> |
| 28 | + <iron-meta key="appName" value="{{appName}}"></iron-meta> |
30 | 29 |
|
31 | 30 | <firebase-auth app-name="[[appName]]"
|
32 | 31 | id="firebaseAuth"
|
|
148 | 147 | }
|
149 | 148 | },
|
150 | 149 |
|
151 |
| - _deepClone: function(obj) { |
152 |
| - var newUser = JSON.parse(JSON.stringify(obj, function(key, val) { |
153 |
| - if (key.length > 0 && key.length < 3) { |
154 |
| - return undefined; |
155 |
| - } |
156 |
| - return val; |
157 |
| - })); |
158 |
| - return newUser; |
159 |
| - }, |
160 |
| - |
161 | 150 | _notifyStatus: function(newStatus, oldStatus) {
|
162 | 151 | if (oldStatus && !newStatus) {
|
163 | 152 | this.fire('logout');
|
|
0 commit comments