I am trying to create an app with Microsoft teams where I basically host an existing web app within a tab.
In that web app, the sign-in is via Firebase email links.
The user enters an email address, gets an email with a link that should bring him back to the app, and log him in.
The problem is that I couldn't find a way for the web app to get access the original URL the user got in the email because the tab will always pass the same URL to the web app as defined in the manifest.
The closest I got is building a deep link to ms teams for the URL that is sent in the email
const actionCodeSettingsTeams = {
// URL you want to redirect back to. The domain (www.example.com) for this
// URL must be in the authorized domains list in the Firebase Console.
url: 'https://teams.microsoft.com/l/entity/extity-id/app
handleCodeInApp: true,
};
await firebase
.auth()
.sendSignInLinkToEmail(
data.email,
actionCodeSettingsTeams,
);
So the user is redirected back to the correct tab
but when checking firebase.auth().isSignInWithEmailLink(window.location.href) it will always return false since the original URL called from the email is gone and the web app only gets the URL defined in the app manifest for that tab.