File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ async function forgotPassword() {
146
146
async function signinWithGoogle() {
147
147
// Firebase auth logic
148
148
if (! auth ) {
149
- console .log (
149
+ console .warn (
150
150
` [${nuxtifyConfig .brand ?.name }] Firebase auth provider not found. ` ,
151
151
)
152
152
return
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { FirebaseError } from 'firebase/app'
3
3
import {
4
4
createUserWithEmailAndPassword ,
5
5
GoogleAuthProvider ,
6
+ signInWithPopup ,
6
7
signInWithRedirect ,
7
8
} from ' firebase/auth'
8
9
import type { VForm } from ' vuetify/components'
@@ -98,12 +99,19 @@ async function submitForm() {
98
99
async function signinWithGoogle() {
99
100
// Firebase auth logic
100
101
if (! auth ) {
101
- console .log (
102
+ console .warn (
102
103
` [${nuxtifyConfig .brand ?.name }] Firebase auth provider not found. ` ,
103
104
)
104
105
return
105
106
}
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
+ }
107
115
}
108
116
</script >
109
117
You can’t perform that action at this time.
0 commit comments