diff --git a/dist/FirebaseAuth.js b/dist/FirebaseAuth.js index 1c632fc7..6204b74b 100644 --- a/dist/FirebaseAuth.js +++ b/dist/FirebaseAuth.js @@ -36,7 +36,9 @@ var FirebaseAuth = function (_React$Component) { var firebaseui = require('firebaseui'); this.firebaseUiWidget = firebaseui.auth.AuthUI.getInstance() || new firebaseui.auth.AuthUI(this.firebaseAuth); - this.firebaseUiWidget.reset(); + if (this.uiConfig.signInFlow === 'popup') { + this.firebaseUiWidget.reset(); + } this.firebaseUiWidget.start('#' + this.elementId, this.uiConfig); }; diff --git a/dist/FirebaseAuth.js.map b/dist/FirebaseAuth.js.map index 15f34828..0decb076 100644 --- a/dist/FirebaseAuth.js.map +++ b/dist/FirebaseAuth.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/FirebaseAuth.jsx"],"names":["ELEMENT_ID","FirebaseAuth","props","uiConfig","firebaseAuth","elementId","className","componentDidMount","require","firebaseui","firebaseUiWidget","auth","AuthUI","getInstance","reset","start","componentWillUnmount","render","Component"],"mappings":";;;;AAiBA;;;;;;;;;;;;AAGA,IAAMA,aAAa,sBAAnB;;IAKqBC,Y;;;AAOnB,wBAAYC,KAAZ,EAAmB;AAAA;;AAAA,iDACjB,4BAAMA,KAAN,CADiB;;AAGjB,UAAKC,QAAL,GAAgBD,MAAMC,QAAtB;AACA,UAAKC,YAAL,GAAoBF,MAAME,YAA1B;AACA,UAAKC,SAAL,GAAiBH,MAAMG,SAAN,IAAmBL,UAApC;AACA,UAAKM,SAAL,GAAiBJ,MAAMI,SAAvB;AANiB;AAOlB;;yBAKDC,iB,gCAAoB;AAElBC,YAAQ,gCAAR;;AAGA,QAAMC,aAAaD,QAAQ,YAAR,CAAnB;AACA,SAAKE,gBAAL,GAAwBD,WAAWE,IAAX,CAAgBC,MAAhB,CAAuBC,WAAvB,MACC,IAAIJ,WAAWE,IAAX,CAAgBC,MAApB,CAA2B,KAAKR,YAAhC,CADzB;AAEA,SAAKM,gBAAL,CAAsBI,KAAtB;AACA,SAAKJ,gBAAL,CAAsBK,KAAtB,CAA4B,MAAM,KAAKV,SAAvC,EAAkD,KAAKF,QAAvD;AACD,G;;yBAKDa,oB,mCAAuB;AACrB,SAAKN,gBAAL,CAAsBI,KAAtB;AACD,G;;yBAiBDG,M,qBAAS;AACP,WACE,uCAAK,WAAW,KAAKX,SAArB,EAAgC,IAAI,KAAKD,SAAzC,GADF;AAGD,G;;;EAzDuC,gBAAMa,S;;kBAA3BjB,Y","file":"FirebaseAuth.js","sourcesContent":["/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// @flow\n\nimport React from 'react';\n\n// Global ID for the element.\nconst ELEMENT_ID = 'firebaseui_container';\n\n/**\n * React Component wrapper for the FirebaseUI Auth widget.\n */\nexport default class FirebaseAuth extends React.Component {\n /**\n * Constructor Firebase Auth UI component\n *\n * @param {Object} props - Additional object properties.\n * @constructor\n */\n constructor(props) {\n super(props);\n\n this.uiConfig = props.uiConfig;\n this.firebaseAuth = props.firebaseAuth;\n this.elementId = props.elementId || ELEMENT_ID;\n this.className = props.className;\n }\n\n /**\n * @inheritDoc\n */\n componentDidMount() {\n // Import the css only on the client.\n require('firebaseui/dist/firebaseui.css');\n\n // Firebase UI only works on the Client. So we're loading in `componentDidMount`.\n const firebaseui = require('firebaseui');\n this.firebaseUiWidget = firebaseui.auth.AuthUI.getInstance()\n || new firebaseui.auth.AuthUI(this.firebaseAuth);\n this.firebaseUiWidget.reset();\n this.firebaseUiWidget.start('#' + this.elementId, this.uiConfig);\n }\n\n /**\n * @inheritDoc\n */\n componentWillUnmount() {\n this.firebaseUiWidget.reset();\n }\n\n /**\n * Properties types.\n */\n props: {\n uiConfig: Object, // The Firebase UI Web UI Config object.\n // See: https://github.com/firebase/firebaseui-web#configuration\n firebaseAuth: Object, // The Firebase App auth instance to use.\n elementId?: String, // The ID of the underlying container that we'll generate.\n // Use this if you use more than one instance at a time in your app.\n className: String\n };\n\n /**\n * @inheritDoc\n */\n render() {\n return (\n
\n );\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/FirebaseAuth.jsx"],"names":["ELEMENT_ID","FirebaseAuth","props","uiConfig","firebaseAuth","elementId","className","componentDidMount","require","firebaseui","firebaseUiWidget","auth","AuthUI","getInstance","signInFlow","reset","start","componentWillUnmount","render","Component"],"mappings":";;;;AAiBA;;;;;;;;;;;;AAGA,IAAMA,aAAa,sBAAnB;;IAKqBC,Y;;;AAOnB,wBAAYC,KAAZ,EAAmB;AAAA;;AAAA,iDACjB,4BAAMA,KAAN,CADiB;;AAGjB,UAAKC,QAAL,GAAgBD,MAAMC,QAAtB;AACA,UAAKC,YAAL,GAAoBF,MAAME,YAA1B;AACA,UAAKC,SAAL,GAAiBH,MAAMG,SAAN,IAAmBL,UAApC;AACA,UAAKM,SAAL,GAAiBJ,MAAMI,SAAvB;AANiB;AAOlB;;yBAKDC,iB,gCAAoB;AAElBC,YAAQ,gCAAR;;AAGA,QAAMC,aAAaD,QAAQ,YAAR,CAAnB;AACA,SAAKE,gBAAL,GAAwBD,WAAWE,IAAX,CAAgBC,MAAhB,CAAuBC,WAAvB,MACC,IAAIJ,WAAWE,IAAX,CAAgBC,MAApB,CAA2B,KAAKR,YAAhC,CADzB;AAEA,QAAI,KAAKD,QAAL,CAAcW,UAAd,KAA6B,OAAjC,EAA0C;AACxC,WAAKJ,gBAAL,CAAsBK,KAAtB;AACD;AACD,SAAKL,gBAAL,CAAsBM,KAAtB,CAA4B,MAAM,KAAKX,SAAvC,EAAkD,KAAKF,QAAvD;AACD,G;;yBAKDc,oB,mCAAuB;AACrB,SAAKP,gBAAL,CAAsBK,KAAtB;AACD,G;;yBAiBDG,M,qBAAS;AACP,WACE,uCAAK,WAAW,KAAKZ,SAArB,EAAgC,IAAI,KAAKD,SAAzC,GADF;AAGD,G;;;EA3DuC,gBAAMc,S;;kBAA3BlB,Y","file":"FirebaseAuth.js","sourcesContent":["/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// @flow\n\nimport React from 'react';\n\n// Global ID for the element.\nconst ELEMENT_ID = 'firebaseui_container';\n\n/**\n * React Component wrapper for the FirebaseUI Auth widget.\n */\nexport default class FirebaseAuth extends React.Component {\n /**\n * Constructor Firebase Auth UI component\n *\n * @param {Object} props - Additional object properties.\n * @constructor\n */\n constructor(props) {\n super(props);\n\n this.uiConfig = props.uiConfig;\n this.firebaseAuth = props.firebaseAuth;\n this.elementId = props.elementId || ELEMENT_ID;\n this.className = props.className;\n }\n\n /**\n * @inheritDoc\n */\n componentDidMount() {\n // Import the css only on the client.\n require('firebaseui/dist/firebaseui.css');\n\n // Firebase UI only works on the Client. So we're loading in `componentDidMount`.\n const firebaseui = require('firebaseui');\n this.firebaseUiWidget = firebaseui.auth.AuthUI.getInstance()\n || new firebaseui.auth.AuthUI(this.firebaseAuth);\n if (this.uiConfig.signInFlow === 'popup') {\n this.firebaseUiWidget.reset();\n }\n this.firebaseUiWidget.start('#' + this.elementId, this.uiConfig);\n }\n\n /**\n * @inheritDoc\n */\n componentWillUnmount() {\n this.firebaseUiWidget.reset();\n }\n\n /**\n * Properties types.\n */\n props: {\n uiConfig: Object, // The Firebase UI Web UI Config object.\n // See: https://github.com/firebase/firebaseui-web#configuration\n firebaseAuth: Object, // The Firebase App auth instance to use.\n elementId?: String, // The ID of the underlying container that we'll generate.\n // Use this if you use more than one instance at a time in your app.\n className: String\n };\n\n /**\n * @inheritDoc\n */\n render() {\n return (\n
\n );\n }\n}\n"]} \ No newline at end of file diff --git a/dist/package-lock.json b/dist/package-lock.json index 550a608e..19c664b5 100644 --- a/dist/package-lock.json +++ b/dist/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-firebaseui", - "version": "1.0.6", + "version": "1.0.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/dist/package.json b/dist/package.json index 8f11143d..7608fde3 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "react-firebaseui", - "version": "1.0.6", + "version": "1.0.10", "description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK", "files": [ "FirebaseAuth.js", @@ -13,8 +13,8 @@ ], "main": "index.js", "scripts": { - "build": "babel src --out-dir dist -s; cp README.md LICENSE package.json dist; cd dist && npm install --only=production", - "publish": "npm run build && cd dist && npm publish" + "build": "babel src --out-dir dist -s; cp README.md LICENSE package.json dist; cd dist && npm install --only=production && cd -", + "pub": "npm run build && npm publish dist" }, "author": "Google", "repository": { diff --git a/package.json b/package.json index ece24cab..7608fde3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-firebaseui", - "version": "1.0.6", + "version": "1.0.10", "description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK", "files": [ "FirebaseAuth.js",