I have a login page using firebase and I can log in and out successfully. What I want to do is to add a redirect. So, when the user logs in they are taken to another tab. Currently, it opens another tab with the correct path but instead of loading the correct content, it loads the login page. See images...
This is the code I am using
const login = async () => {
try {
const existingUser = await signInWithEmailAndPassword(auth, LoginEmail, LoginPassword, browserSessionPersistence,)
console.log(existingUser);
window.open('./Test')
}catch (err){
if (err) {
console.log(err);
}
}
}
Am I missing something?