Open nisserne opened 4 years ago
I don't think there is any way to go back to the original tab.
I agree that two open, logged in tabs is messy and confusing. Nevertheless, I love the potential of passwordless auth.
Here are my workarounds:
if (firebase.auth().isSignInWithEmailLink(window.location.href)) {
// prompt user to return to original | close this tab | etc.
}
When using the Email Link Authentication method with firebaseUI-web, the emailed hyperlink opens a new browser tab in order to confirm/authenticate the email reception to firebase, and then redirects to the initial URL. This leaves the user with two browser tabs with the same (authenticated) original URL.
Is there a way to end up with only one open browser tab?
I have tried to configure the firebaseUI EmailAuthProvider with an emailLinkSignIn function returning: { url: '';}, this has no effect. {url: '[another url]';}, this opens 'another url' but then does not authenticate the user (in the original browser tab). (My idea was that I could show a confirmation and guide the user to the original tab).