title: Firebase SDK Auth Package Trouble with Automatically Loading Scene Once Authenticated Unity
body: <p>I am stuck with a functionality of the Firebase SDK (Auth package) regarding the Scenes and it's integration. Here's how they work:</p>
  <p><strong>1st: Loading Scene</strong></p>
  <p>Here, I just added the FirebaseInit code EXACTLY as suggested by Patrick, which it's only function is to call the next scene (Login/Register) once everything loads correctly.</p>
  <p><strong>2nd: Login/Register Scene</strong></p>
  <p>Here I do all the Login AND ALSO the register logic. I set up a button that alternates between the two (Activating the respective parent gameObject within the Canvas). Once the user log's in, the 3rd scene comes into play.</p>
  <p><strong>3rd: App's Main Screen Scene</strong></p>
  <p>Main Screen of the app, where the user can LOGOUT and return to the Login Scene.</p>
  <h3>Problem</h3>
  <p>I added the 'LoadSceneWhenUserAuthenticated.cs' in the 2nd Scene, and it works (kind of).
  It actually does what it is supposed to. If I log in, quit the game without loging out, and open it again, it does come back directly to the 3rd scene. BUT some things are happening and they aren't supposed to.</p>
  <p><strong>First</strong></p>
  <p>When I Sign Up a user, I call the method 'CreateUserWithEmailAndPasswordAsync()'. Once it completes, it should activate the login screen and stay there, waiting for the user to fill in the password, but the 'FirebaseAuth.DefaultInstance.StateChanged' comes into play and forces the 3rd screen to be loaded, skipping several other steps that should be taken (email registration for example).</p>
  <p><strong>Second</strong></p>
  <p>As I mentioned in the end of number 1 above, if I try to log in to an account that does not have it's email verified, it works! (due to the 'LoadSceneWhenUserAuthenticated.cs' which is added in the scene). Code:</p>
  <pre><code>var LoginTask = auth.SignInWithEmailAndPasswordAsync(_email, _password);
        LoginTask.ContinueWithOnMainThread(task =&gt;
         {
           if (task.IsCanceled || task.IsFaulted)
           {
             Firebase.FirebaseException e =
               task.Exception.Flatten().InnerExceptions[0] as Firebase.FirebaseException;
             GetErrorMessage((AuthError)e.ErrorCode, warningLoginText);
             return;
           }
           if (task.IsCompleted)
           {
             User = LoginTask.Result;
              if (User.IsEmailVerified == true)
             {
               UIControllerLogin.instance.MainScreenScene();
             }
             else
             {
               warningLoginText.text = Lean.Localization.LeanLocalization.GetTranslationText($&quot;Login/VerifyEmail&quot;);
             }
  </code></pre>
  <p>I know that it's possible to fix this issue by adding an extra scene just before the login scene (as Patrick does in the youtube video) but it doesn't make any sense in my app. It would actually only harm the UX of it.</p>
  <p>Patrick's Video:</p>
  <p><a href="https://www.youtube.com/watch?v=52yUcKLMKX0&amp;t=264s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=52yUcKLMKX0&amp;t=264s</a></p>