Skip to content

Stuck on oauth.login() #354

@sjordan2010

Description

@sjordan2010

I have 3 different apps that use aad_oauth package, and they all are experiencing the same issue.

The app builds and opens. But when I click login, it gets stuck forever on the "loader" screen with no error messages or anything. I never make it to the actual Microsoft login page. This wasn't the case until recently.

I have tried iOS 15, 17, and 18 simulators. I have tried to downgrade Flutter, using different versions of this along with other packages, clean all the builds, completely reset the simulators, all to no avail.

##Config / Setup:

class AccountScreenState extends State<AccountScreen> {
  AccountScreenState(this.reset);
  late AppConfig config;

  static final aad_config.Config aadConfig = aad_config.Config(
      tenant: "xxx",
      clientId: "xxx",
      scope: "openid profile offline_access",
      redirectUri: "https://login.live.com/oauth20_desktop.srf",
      navigatorKey: navigatorKey,
      webUseRedirect: true,
      loader: const Center(child: CircularProgressIndicator()));
  final AadOAuth oauth = AadOAuth(aadConfig);

##Login function

   void login() async {
    try {
      setState(() {
        _message = "Attempting to sign you in, please wait.";
        _buttonOrLoad = buttonOrLoading(false);
      });

      //Check AAD
      print('before'); // THIS ALWAYS FIRES
      await oauth.login();
      print('after');  // THIS NEVER FIRES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions