Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How navigate directly to a particular screen after authentication. #285

Open
ArivananthaPandian0312 opened this issue Jan 11, 2024 · 3 comments
Labels

Comments

@ArivananthaPandian0312
Copy link

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.

@Refaydeen
Copy link

Refaydeen commented Jan 14, 2024

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

@gijominuscule
Copy link

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

Copy link

github-actions bot commented Aug 9, 2024

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 github-actions bot added the stale label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants