'Flutter - OAuth Azure AD - Authentication

Has anyone done OAuth authentication to Azure Active Directory (B2C)? I used the plugin

I have a problem after authentication to return to the app page. The authentication screen does not close and does not return to the app.

Future<void> _logIn() async {
try {
  final AuthorizationTokenResponse result =
      await appAuth.authorizeAndExchangeCode(
    AuthorizationTokenRequest(
      _clientId,
      _redirectUrl,
      serviceConfiguration:
          AuthorizationServiceConfiguration(_authorizeUrl, _tokenUrl),
      scopes: _scopes,
    ),
  );
  if (result != null) {
    _processAuthTokenResponse(result);
  }
} catch (e) {
  print(e);
}

}

Tks, Luciano



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source