1

My app opens a browser for the user to log in. The back end app then issues a redirect to a deep link.

My routes file has this:

      GoRoute(
        path: '/login/:token',
        builder: (context, state) {
          final token = state.params['token'];
          if(token != null) {
            setLoginToken(token);
          }
          return Home();
        },

The routes file is invoked on launch, so the router is working.

My Info.plist has:

    <key>FlutterDeepLinkingEnabled</key>
    <true/>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>mydomain</string>
            <key>CFBundleURLSchemes</key>
            <array>
            <string>my_invented_scheme</string>
            </array>
        </dict>
    </array>

The back end is redirecting to my_invented_scheme://mydomain/login/eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNjUiLCJzY3AiOiJ1c2VyIiwiYXV…

The browser asks if it should open my app. I click Ok.

And… nothing happens. My app comes to the front, but the router is not invoked at all. So my app stays on the spinner I show while the browser is in front.

Please advise!

1 Answers1

1

I rebuilt the application from scratch and now it's working.

There is still a big issue that I could find no way of debugging the issue nor any advice anywhere about how to approach it.