File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ async function forgotPassword() {
146146async function signinWithGoogle() {
147147 // Firebase auth logic
148148 if (! auth ) {
149- console .log (
149+ console .warn (
150150 ` [${nuxtifyConfig .brand ?.name }] Firebase auth provider not found. ` ,
151151 )
152152 return
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { FirebaseError } from 'firebase/app'
33import {
44 createUserWithEmailAndPassword ,
55 GoogleAuthProvider ,
6+ signInWithPopup ,
67 signInWithRedirect ,
78} from ' firebase/auth'
89import type { VForm } from ' vuetify/components'
@@ -98,12 +99,19 @@ async function submitForm() {
9899async function signinWithGoogle() {
99100 // Firebase auth logic
100101 if (! auth ) {
101- console .log (
102+ console .warn (
102103 ` [${nuxtifyConfig .brand ?.name }] Firebase auth provider not found. ` ,
103104 )
104105 return
105106 }
106- signInWithRedirect (auth , googleProvider )
107+ if (import .meta .dev ) {
108+ // Use this with localhost, still might need to refresh or manually update address bar
109+ signInWithPopup (auth , googleProvider )
110+ }
111+ else {
112+ // Doesn't work on localhost
113+ signInWithRedirect (auth , googleProvider )
114+ }
107115}
108116 </script >
109117
You can’t perform that action at this time.
0 commit comments