aad_oauth icon indicating copy to clipboard operation
aad_oauth copied to clipboard

How navigate directly to a particular screen after authentication.

Open ArivananthaPandian0312 opened this issue 2 years ago • 3 comments

I have a login screen with login button, on the click of the login button it will open the Microsoft authentication webpage and user can login with his credentials , but after authentication it comes back to LoginScreen for a sec and then navigates to HomeScreen. Is there any way to directly navigate user to the HomeScreen after successful authentication.

ArivananthaPandian0312 avatar Jan 11 '24 09:01 ArivananthaPandian0312

can you give a code for referece because i had some error while running,first one is i m developing pwa but in mobile client secret key or client assertion key error and in web it is not printing in console anything

Refaydeen avatar Jan 14 '24 06:01 Refaydeen

void loginByAzure(bool redirect) async { final Config config = Config( tenant: 'xxxxxxxx', clientId: 'yyyyyyy', scope: 'email openid', redirectUri: ds, navigatorKey: navigatorKey, loader: SizedBox(), appBar: AppBar( title: Text('Azure Login'), ), clientSecret: '4444444444', onPageFinished: (String url) { print('onPageFinished: $url'); }, postLogoutRedirectUri: 'https://www.app.cryotos.com', ); final AadOAuth oauth = AadOAuth(config); config.webUseRedirect = redirect; final result = await oauth.login(); result.fold( (l) => showError(l.toString()), (r) => showMessage('Logged in successfully, your access token: $r'), ); var accessToken = await oauth.getAccessToken(); if (accessToken != null) { ScaffoldMessenger.of(context).hideCurrentSnackBar(); ScaffoldMessenger.of(context) .showSnackBar(SnackBar(content: Text(accessToken))); } }

after authentication success came back to mobileview loginpage its not working

gijominuscule avatar May 27 '24 09:05 gijominuscule

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] avatar Aug 09 '24 02:08 github-actions[bot]

Closing this issue due to lack of activity.

github-actions[bot] avatar Feb 16 '25 02:02 github-actions[bot]