---
title: "Comment by Mauricio Ahumada on \"Flutter Authentication Flow with Go Router and Provider\" | Hashnode"
description: "Hi, thanks for the tutorial. however I couldn&#39;t make it work. Cloned your repo and got some errors from the get go. I had to flutter create . and flutter pu"
url: "https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5/comment/63828840def1df04cdae9bca"
---

[Discussion](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5)

Comment [Flutter Authentication Flow with Go Router and Provider](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5)

[Mauricio Ahumada](https://hashnode.com/@SonMauri)

[Nov 26, 2022](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5/comment/63828840def1df04cdae9bca)

Hi, thanks for the tutorial. however I couldn't make it work. Cloned your repo and got some errors from the get go. I had to

```
flutter create .
```

and

```
flutter pub upgrade
```

Besides updating the dependencies in pubspec.yaml

```
  provider: ^6.0.4
  go_router: ^5.2.0
  shared_preferences: ^2.0.15
```

Also, I had to change the redirect definition to

```
redirect: (context, state) {
```

After all that I could finally run the app but only to find out it never leaves the splashScreen... All it shows it the CircularProgressIndicator forever...

In onAppStart() I commented out the line that waited for two seconds then I ran into an error I couldn't figure it out.

```
======== Exception caught by foundation library ====================================================
The following assertion was thrown while dispatching notifications for AppService:
setState() or markNeedsBuild() called during build.
```

I googled the error but failed miserable. Any ideas?

[Daewoom Kim](https://hashnode.com/@daepal)

[Dec 5, 2022](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5/comment/63828840def1df04cdae9bca#reply-638d657c4a96bb8fda439f85)

Same here. I think the difference between Go\_Router versions causes the issue. When I run sample project, it works as expected.(2.5.5) However, when I updated go\_router version number to the latest (5.2.1), it shows progress indicator forever.

Any idea to solve or go around the issue?

[Valerii Igumentsev](https://hashnode.com/@booperdev)

[Jan 15, 2023](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5/comment/63828840def1df04cdae9bca#reply-63c40a9b8f346b3f17ab91d3)

[Daewoom Kim](https://hashnode.com/@daepal)

Remove routeDelegare and routeInformationParser, and just provide goRouter object to routerConfig prop of MaterialApp.router constructor, like this:

routerConfig: goRouter,

[Khoshbin](https://hashnode.com/@xoshbin)

[Jul 9, 2023](https://hashnode.com/posts/flutter-authentication-flow-with-go-router-and-provider/61c37acec0206b3f41f549c5/comment/63828840def1df04cdae9bca#reply-64ab09fba25b1020144636e4)

[Valerii Igumentsev](https://hashnode.com/@booperdev) Thank you, I was struggling with that
