Initial Firebase refactor pass

This commit is contained in:
Andrew Bastin
2021-06-14 00:07:30 -04:00
parent ced2f1b911
commit 85c6932f8f
30 changed files with 979 additions and 1029 deletions

View File

@@ -69,7 +69,7 @@
</template>
<script>
import { fb } from "~/helpers/fb"
import { currentUser$, signInWithEmail } from "~/helpers/fb/auth"
export default {
props: {
@@ -77,7 +77,6 @@ export default {
},
data() {
return {
fb,
form: {
email: "",
},
@@ -88,7 +87,7 @@ export default {
}
},
mounted() {
this.$subscribeTo(fb.currentUser$, (user) => {
this.$subscribeTo(currentUser$, (user) => {
if (user) this.hideModal()
})
@@ -110,8 +109,7 @@ export default {
url: `${process.env.BASE_URL}/enter`,
handleCodeInApp: true,
}
await fb
.signInWithEmail(this.form.email, actionCodeSettings)
await signInWithEmail(this.form.email, actionCodeSettings)
.then(() => {
this.mode = "email"
window.localStorage.setItem("emailForSignIn", this.form.email)