How to find original email redirect link from landing page for firebase email link sign in option

In firebase, in order to authenticate a use after they click an email link, firebase needs the original clicked email link.
Example
This link redirects you a few times, and brings you to the page needed (currently set to localhost for dev purposes)
Firebase will only accept the email link, and only for one test per email which makes it difficult to diagnose this.
I need a way to fetch the first link clicked (the email link) from the landing page.
I apolagise if this has been answered anywhere else but I tried several combinations of keywords that did not work

export default function Home() {

  return (
    <>   
        boilerplate
        <button onClick={bigFunction}>Press me to check if the browser has the email saved</button>
    </>
  )
}
let signinwithemaillink = "https://ticketme.page.link/qbvQ"
function bigFunction()
{
  console.log(window.location.href)
  if (isSignInWithEmailLink(auth, signinwithemaillink)) {
    // Additional state parameters can also be passed via URL.
    // This can be used to continue the user's intended action before triggering
    // the sign-in operation.
    // Get the email if available. This should be available if the user completes
    // the flow on the same device where they started it.
    let email = window.localStorage.getItem('emailForSignIn');
    if (!email) {
      // User opened the link on a different device. To prevent session fixation
      // attacks, ask the user to provide the associated email again. For example:
      email = '[email protected]';
    }
    
    // The client SDK will parse the code from the link for you.
    signInWithEmailLink(auth, email, signinwithemaillink)
      .then((result) => {
        alert("all good")
        console.log(result.user)
        // Clear email from storage.
        window.localStorage.removeItem('emailForSignIn');
        // You can access the new user via result.user
        // Additional user info profile not available via:
        // result.additionalUserInfo.profile == null
        // You can check if the user is new or existing:
        // result.additionalUserInfo.isNewUser
      })
      .catch((error) => {
        console.log(error.code)
        // Some error occurred, you can inspect the code: error.code
        // Common errors could be invalid email and invalid or expired OTPs.
      });
  }  
}

As you can tell there is still an incredible amount of comments from the firebase docs, Im just trying to get this to work.