flutter_account_kit
flutter_account_kit copied to clipboard
Getting Error: Invalid OAuth 2.0 Access Token in iOS
I tried to get account info after successful login but got all properties of Account
object as null
and also prints error log:
[AccountKit][Error]: Invalid OAuth 2.0 Access Token
Snippet:
await flutterAccountKit.configure(Config()
..facebookNotificationsEnabled = true
..receiveSMS = true
..readPhoneStateEnabled = true
..theme = FacebookitTheme.theme);
LoginResult result = await flutterAccountKit.logInWithPhone();
switch (result.status) {
case LoginStatus.loggedIn:
bool isLoggedIn = await flutterAccountKit.isLoggedIn;
print(isLoggedIn) // false
Account account = await flutterAccountKit.currentAccount;
if (account != null) {
print(account.phoneNumber); // null
print(account.accountId); // null
}
return true;
default:
// do something else
}
- Values in
Info.plist
is correct (triple checked it) and also enabled Enable Client Access Token Flow in App Dashboard. - Only fails in iOS
$ flutter doctor -v
[✓] Flutter (Channel beta, v1.2.1, on Mac OS X 10.14.4 18E226, locale en-GB)
• Flutter version 1.2.1 at /usr/local/flutter
• Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)