title: Shared View Model between two fragments in the nav_graph
body: <p>I have an app with one activity and about 29 Fragment in the <code>nav_graph</code>, two of these fragments are used for authentication, and I need to share data between these two fragments using a <code>shared view model</code> but not with the other fragments.</p>
  <p>So, I created my <code>ViewModel</code> and instantiated it in both fragments using the <code>viewModels()</code> which is a part of <code>fragment-ktx</code> library.</p>
  <pre class="lang-kotlin prettyprint-override"><code>private val viewModel: AuthViewModel by viewModels()
  </code></pre>
  <p>However, once I navigate to the second fragment using the <code>findNavController().navigate()</code> I lose all the data in the <code>AuthViewModel</code></p>
  <p><strong>AuthViewModel.kt</strong></p>
  <pre class="lang-kotlin prettyprint-override"><code>class AuthViewModel @ViewModelInject constructor(
      private val authRepository: AuthRepository
  ) : BaseViewModel()
  </code></pre>
  <p>Is there any additional step I'm missing here?</p>
  <p><strong>EDIT</strong></p>
  <p>I'm accessing the data from the <code>onViewCreated</code> method</p>