251212_register
This commit is contained in:
@@ -406,15 +406,19 @@ import useUserStore from '@/stores/user';
|
|||||||
import { checkEmailDuplicate } from '@/utils/firebaseUtils';
|
import { checkEmailDuplicate } from '@/utils/firebaseUtils';
|
||||||
import AppTermsofUse from '~/components/TermsofUse.vue';
|
import AppTermsofUse from '~/components/TermsofUse.vue';
|
||||||
import AppLoadingOverlay from '~/components/LoadingOverlay.vue';
|
import AppLoadingOverlay from '~/components/LoadingOverlay.vue';
|
||||||
import {
|
import { useNuxtApp } from '#app';
|
||||||
auth,
|
import { signInWithPhoneNumber } from 'firebase/auth';
|
||||||
phoneNumberAuth,
|
const { $firebase, $createRecaptchaVerifier } = useNuxtApp();
|
||||||
createRecaptchaVerifier,
|
|
||||||
} from '@/utils/firebaseUtils';
|
const firebaseAuth = $firebase.auth;
|
||||||
|
const createRecaptchaVerifier =
|
||||||
|
$firebase.createRecaptchaVerifier ?? $createRecaptchaVerifier;
|
||||||
|
|
||||||
|
// ② If you did NOT touch the plugin, just use:
|
||||||
|
/// const createRecaptchaVerifier = $createRecaptchaVerifier;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { signInWithPhoneNumber } = phoneNumberAuth;
|
|
||||||
const emits = defineEmits(['register-success']);
|
const emits = defineEmits(['register-success']);
|
||||||
|
|
||||||
/* ---------- STEP control ---------- */
|
/* ---------- STEP control ---------- */
|
||||||
@@ -500,7 +504,6 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* ---------- Phone verification ---------- */
|
/* ---------- Phone verification ---------- */
|
||||||
const firebaseAuth = auth;
|
|
||||||
const rawPhoneNumber = ref('');
|
const rawPhoneNumber = ref('');
|
||||||
const phoneNumber = ref('');
|
const phoneNumber = ref('');
|
||||||
const smsCode = ref('');
|
const smsCode = ref('');
|
||||||
|
|||||||
Reference in New Issue
Block a user