The authDomain given inside the firebaseConfig when creating the web application is set as a default domain inside the authorized domains.
But still, when I try to use the login with popup it gives the "unauthorized domain" error.
I don't know what to do at this point.
I'm using this library: https://github.com/wobsoriano/solid-firebase but I don't think that's the problem.
Here is the code:
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const provider = new GoogleAuthProvider();
const db = getFirestore(app)
const Login = () => {
const signIn = () => signInWithPopup(auth, provider)
return <button onClick={signIn}>Sign In with Google</button>
}
const App = () => {
const state = useAuth(auth)
return (
<Switch>
<Match when={state.loading}>
<p>Loading...</p>
</Match>
<Match when={!state.data || state.error}>
<Login />
</Match>
<Match when={state.data}>
<p>Logged</p>
</Match>
</Switch >
)
}
Just go to
Authentication Settingsand add your domain to that.