101101 {{ t('auth.apiKey.generateKey') }}
102102 </a >
103103 </small >
104+ <Message
105+ v-if =" authActions.accessError.value"
106+ severity =" info"
107+ icon =" pi pi-info-circle"
108+ variant =" outlined"
109+ closable
110+ >
111+ {{ t('toastMessages.useApiKeyTip') }}
112+ </Message >
104113 </div >
105114
106115 <!-- Terms & Contact -->
134143import Button from ' primevue/button'
135144import Divider from ' primevue/divider'
136145import Message from ' primevue/message'
137- import { onMounted , ref } from ' vue'
146+ import { onMounted , onUnmounted , ref } from ' vue'
138147import { useI18n } from ' vue-i18n'
139148
149+ import { useFirebaseAuthActions } from ' @/composables/auth/useFirebaseAuthActions'
140150import { COMFY_PLATFORM_BASE_URL } from ' @/config/comfyApi'
141151import { SignInData , SignUpData } from ' @/schemas/signInSchema'
142- import { useFirebaseAuthService } from ' @/services/firebaseAuthService'
143152import { isInChina } from ' @/utils/networkUtil'
144153
145154import ApiKeyForm from ' ./signin/ApiKeyForm.vue'
@@ -151,7 +160,7 @@ const { onSuccess } = defineProps<{
151160}>()
152161
153162const { t } = useI18n ()
154- const authService = useFirebaseAuthService ()
163+ const authActions = useFirebaseAuthActions ()
155164const isSecureContext = window .isSecureContext
156165const isSignIn = ref (true )
157166const showApiKeyForm = ref (false )
@@ -162,25 +171,25 @@ const toggleState = () => {
162171}
163172
164173const signInWithGoogle = async () => {
165- if (await authService .signInWithGoogle ()) {
174+ if (await authActions .signInWithGoogle ()) {
166175 onSuccess ()
167176 }
168177}
169178
170179const signInWithGithub = async () => {
171- if (await authService .signInWithGithub ()) {
180+ if (await authActions .signInWithGithub ()) {
172181 onSuccess ()
173182 }
174183}
175184
176185const signInWithEmail = async (values : SignInData ) => {
177- if (await authService .signInWithEmail (values .email , values .password )) {
186+ if (await authActions .signInWithEmail (values .email , values .password )) {
178187 onSuccess ()
179188 }
180189}
181190
182191const signUpWithEmail = async (values : SignUpData ) => {
183- if (await authService .signUpWithEmail (values .email , values .password )) {
192+ if (await authActions .signUpWithEmail (values .email , values .password )) {
184193 onSuccess ()
185194 }
186195}
@@ -189,4 +198,8 @@ const userIsInChina = ref(false)
189198onMounted (async () => {
190199 userIsInChina .value = await isInChina ()
191200})
201+
202+ onUnmounted (() => {
203+ authActions .accessError .value = false
204+ })
192205 </script >
0 commit comments