-
Notifications
You must be signed in to change notification settings - Fork 121
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
Exception thrown in flutter_example/lib/openid_browser.dart #76
Comments
Ok, that's unfortunate indeed, but if I understand correctly, you are still redirected to the login screen and you are still able to login? I should probably replace that line with a never completing Future. |
Yes, I got redirected and I'm able to login, so your code works perfectly. Only the exception was misleading me. |
Faced the same issue, however got it fixed by changing the method a bit into: void authenticate(Client client, {List<String> scopes = const []}) {
var authenticator = browser.Authenticator(client, scopes: scopes);
authenticator.authorize();
} Can someone please explain to me why the original method in the example is async to begin with and its signature says it's returning a |
It seems just making the // ...
OutlinedButton(
child: const Text('Login'),
onPressed: () {
authenticate(client, scopes: scopes);
}),
// ... Still feels awkward for a solution though... Edit: removed forgotten |
should be fixed in version |
Unfortunately the
throw Exception('Will never reach here');
is executed:output:
Steps to reproduce:
flutter run -d chrome
The error happens after pressing the Login button in chrome and before Login Screen of keycloak is shown.
Everything works fine if I run
flutter run -d macos
.The text was updated successfully, but these errors were encountered: