title: Firebase Email Verification Redirect Url
body: <p>I incorporated <code>Firebase's</code> email verification for my <code>iOS</code> mobile app and am trying to resolve the following issues:</p>
  
  <ol>
  <li>The length of the redirect url appears <em>extremely</em> long. It looks like it repeats itself. </li>
  </ol>
  
  <blockquote>
    <p><a href="https://app.page.link?link=https://app.firebaseapp.com/__/auth/action?apiKey%3XXX%26mode%3DverifyEmail%26oobCode%3XXX%26continueUrl%3Dhttps://www.app.com/?verifyemail%253Demail@gmail.com%26lang%3Den&amp;ibi=com.app.app&amp;ifl=https://app.firebaseapp.com/__/auth/action?apiKey%3XXX%26mode%3DverifyEmail%26oobCode%3XXX%26continueUrl%3Dhttps://www.app.com/?verifyemail%253Demail@gmail.com%26lang%3Den" rel="nofollow noreferrer">https://app.page.link?link=https://app.firebaseapp.com/<strong>/auth/action?apiKey%3XXX%26mode%3DverifyEmail%26oobCode%3XXX%26continueUrl%3Dhttps://www.app.com/?verifyemail%253Demail@gmail.com%26lang%3Den&amp;ibi=com.app.app&amp;ifl=https://app.firebaseapp.com/</strong>/auth/action?apiKey%3XXX%26mode%3DverifyEmail%26oobCode%3XXX%26continueUrl%3Dhttps://www.app.com/?verifyemail%253Demail@gmail.com%26lang%3Den</a></p>
  </blockquote>
  
  <ol start="2">
  <li>When I set <code>handleCodeInApp</code> equal to true, and am redirected back to the app when I click on the redirect url, the user's email is not verified. Whereas when I set it to false and go through <code>Firebase's</code> provided web widget, it does get verified. Wasn't able to find documentation that outlined handling the former in swift...</li>
  </ol>
  
  <p>Any thoughts are appreciated.</p>
  
  <pre><code>func sendActivationEmail(_ user: User) {
          let actionCodeSettings = ActionCodeSettings.init()
          let redirectUrl = String(format: "https://www.app.com/?verifyemail=%@", user.email!)
  
          actionCodeSettings.handleCodeInApp = true
          actionCodeSettings.url = URL(string: redirectUrl)
          actionCodeSettings.setIOSBundleID("com.app.app")
  
          Auth.auth().currentUser?.sendEmailVerification(with: actionCodeSettings) { error in
              guard error == nil else {
                  AlertController.showAlert(self, title: "Send Error", message: error!.localizedDescription)
                  return
              }
          }
      } 
  </code></pre>