hitherejoe / FlutterOAuth

A Flutter OAuth package for performing user authentication for your apps.
Other
178 stars 56 forks source link

type 'Future<dynamic>' is not a subtype of type 'Future<Null>' #13

Open Jannis87 opened 6 years ago

Jannis87 commented 6 years ago

I tried to create a very basic example. I just created a method like this and called it: `Future _performOAuthLogin(String client_id, String client_secret) { final OAuth flutterOAuth = new FlutterOAuth(new Config( "https://localhost:8888/oauth/authorize", "https://localhost:8888/oauth/token", client_id, client_secret, "http://localhost:8080", "code"));

return flutterOAuth.performAuthorization();

}`

This code snippit leads to the following exception: `[VERBOSE-2:dart_error.cc(16)] Unhandled exception: type 'Future' is not a subtype of type 'Future'

0 FlutterWebviewPlugin.close (package:flutter_webview_plugin/flutter_webview_plugin.dart:73:36)

1 FlutterOAuth.requestCode (package:flutter_oauth/lib/flutter_auth.dart:26:21)

#2 OAuth.performAuthorization (package:flutter_oauth/lib/oauth.dart:49:31) ` Am i doing something wrong?
JamesWatton commented 6 years ago

Same issue here - any word on when this might get looked at?

mathieujobin commented 5 years ago

this bug is inside a dependency, likely it has been fixed upstream and just need to be updated.

I'd recommend testing out the fork mentioned in #14