Earlybyte / aad_oauth

Flutter Azure Active Directory OAuth Package
https://pub.dev/packages/aad_oauth
MIT License
92 stars 186 forks source link

Login method opens Webview screen in Mobile when token expires #306

Closed nayanAubie closed 4 months ago

nayanAubie commented 7 months ago

Description

Code snippet

final config = Config(
      tenant: tenant,
      clientId: clientId,
      scope: 'MyAppName.Use', // I am not using "offline_access"
      redirectUri: 'msal$clientId://auth',
      navigatorKey: AppService.instance.navigatorKey,
      webUseRedirect: true,
      appBar: AppBar(),
      loader: const Center(child: CircularProgressIndicator()),
    );
    final aadOAuth = AadOAuth(config);
    final result = aadOAuth.login(refreshIfAvailable: true);

   result.fold(
          (error) {
            log('Error);
          },
          (token) async {
            // I am saving "token.accessToken" to local storage.
          },
        );

Device details

OnePlus 6T - Android 11

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you still think this issue is needed, reopen it again.

github-actions[bot] commented 4 months ago

false