title: How to handle authenticated routes and their redirects after successful auth?
body: <p><strong><a href="https://flutter.dev/go/navigator-with-router" rel="nofollow noreferrer">Flutter Web(Navigator 2.0/Router API)</a>:</strong>
  How to handle authenticated routes and their redirects after successful auth?</p>
  <p>e.g.
  I have these kind of routes on my system</p>
  <pre><code>/book/xyz (authenticated user)
  /author/abc/book/xyz (authenticated user)
  /authentication (non-authenticated user)
  /info (non-authenticated user)
  </code></pre>
  <p>If user opens this URL directly, I wanted to ask user to login first, at that time route will be redirected to..</p>
  <pre><code>/authentication
  </code></pre>
  <p><strong>Once logged in, I would like to user to navigate previously opened URL if any else home..</strong></p>
  <p>Seems like this kind of things may help, any thoughts - how we can achieve similar things?
  <a href="https://stackoverflow.com/a/43171515/2145844">https://stackoverflow.com/a/43171515/2145844</a></p>
  <p>I have tried few samples for Navigation 2.0 / Router API, yes I can understand the concepts a bit..</p>
  <p>Some of the references, I have looked at..</p>
  <p><a href="https://medium.com/flutter/learning-flutters-new-navigation-and-routing-system-7c9068155ade" rel="nofollow noreferrer">https://medium.com/flutter/learning-flutters-new-navigation-and-routing-system-7c9068155ade</a>
  <a href="https://github.com/orestesgaolin/navigator_20_example" rel="nofollow noreferrer">https://github.com/orestesgaolin/navigator_20_example</a>
  <a href="https://github.com/flutter/flutter/tree/master/dev/benchmarks/test_apps/stocks" rel="nofollow noreferrer">https://github.com/flutter/flutter/tree/master/dev/benchmarks/test_apps/stocks</a></p>