scientifichackers / flutter_cognito_plugin Goto Github PK
View Code? Open in Web Editor NEWAn AWS cognito plugin for flutter
License: GNU Lesser General Public License v3.0
An AWS cognito plugin for flutter
License: GNU Lesser General Public License v3.0
How can I contribute to this repo? I detailed the necessary steps to get the example working and I'd like to make a PR.
/flutter ( 9995): #12 TapGestureRecognizer.handleTapUp (package:flutter/src
I/flutter ( 9995): FormatException: Unexpected character (at character 1)
I/flutter ( 9995): [email protected]
I/flutter ( 9995): ^
I/flutter ( 9995): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1405:5)
I/flutter ( 9995): #1 _ChunkedJsonParser.parseNull (dart:convert-patch/convert_patch.dart:996:7)
I/flutter ( 9995): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:879:22)
I/flutter ( 9995): #3 _parseJson (dart:convert-patch/convert_patch.dart:40:10)
I/flutter ( 9995): #4 JsonDecoder.convert (dart:convert/json.dart:506:36)
I/flutter ( 9995): #5 JsonCodec.decode (dart:convert/json.dart:157:41)
I/flutter ( 9995): #6 jsonDecode (dart:convert/json.dart:96:10)
I/flutter ( 9995): #7 MyAppState.signUp.<anonymous closure> (package:flutter_cognito_plugin_example/main.dart:166:61)
I/flutter ( 9995): #8 MyAppState.onPressWrapper.wrapper (package:flutter_cognito_plugin_example/main.dart:109:26)
I/flutter ( 9995): #9 MyAppState.onPressWrapper.wrapper (package:flutter_cognito_plugin_example/main.dart:102:12)
I/flutter ( 9995): #10 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:21)
I/flutter ( 9995): #11 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:193:24)
I/flutter ( 9995): #12 TapGestureRecognizer.handleTapUp (package:flutter/src
I want to see if you have added social login support?
Hi,
I'm having problems during the release process, the Gradle task failing is compileReleaseKotlin.
I suppose is kind of a misconfiguration do you have any idea?
thx
.pub-cache/hosted/pub.dartlang.org/flutter_cognito_plugin-.pub-cache/hosted/pub.dartlang.org/flutter_cognito_plugin-2.2.0/android/src/main/kotlin/com/pycampers/flutter_cognito_plugin/Cognito.kt: (18, 22): Unresolved reference: plugin_scaffold
.pub-cache/hosted/pub.dartlang.org/flutter_cognito_plugin-2.2.0/android/src/main/kotlin/com/pycampers/flutter_cognito_plugin/Cognito.kt: (29, 17): Unresolved reference: trySend
.pub-cache/hosted/pub.dartlang.org/flutter_cognito_plugin-2.2.0/android/src/main/kotlin/com/pycampers/flutter_cognito_plugin/Cognito.kt: (33, 17): Unresolved reference: sendThrowable
Hi,
I have cloned the example app and I have added awsconfiguration.json file with my cognito info.
I then tried using sign up (i.e. email + password) and this worked, and my user was shown in my user pool.
I then added in google_sign_in package:
google_sign_in: ^4.2.0
And did the necessary config.
I ended up using the code below:
signInGoogle() async { final dynamic result = await signInWithGoogle(); Cognito .federatedSignIn('accounts.google.com', result.idToken) .then((res) { print(res); }).catchError((dynamic error) { print(error); }); }
I get a "flutter: UserState.SIGNED_IN" back and the state shows that I'm signed in.
I then go under my groups, e.g.
Groups => eu-west-xxx_Google
But I don't see the user.
I don't have any errors in the app, and so was wondering if you could point me in the right direction to get this working.
Thanks, Robert
Update:
From what I see the user is not logged in, although the federatedSignIn simply returns "UserState.SIGNED_IN" as a response.
Until a few hours ago where I made a pub get to refresh my dependencies, this was working fine. I currently have my awsconfiguration.json file within the res/raw directory inside of my android file when running 'flutter run' within the console, it throws the following error:
I/flutter (16510): java.lang.RuntimeException: Failed to read awsconfiguration.json please check that it is correctly formed.
I/flutter (16510): at com.amazonaws.mobile.config.AWSConfiguration.readInputJson(AWSConfiguration.java:125)
I/flutter (16510): at com.amazonaws.mobile.config.AWSConfiguration.<init>(AWSConfiguration.java:109)
I/flutter (16510): at com.amazonaws.mobile.config.AWSConfiguration.<init>(AWSConfiguration.java:94)
I/flutter (16510): at com.amazonaws.mobile.config.AWSConfiguration.<init>(AWSConfiguration.java:71)
I/flutter (16510): at com.amazonaws.mobile.client.AWSMobileClient.initialize(AWSMobileClient.java:434)
I/flutter (16510): at com.pycampers.flutter_cognito_plugin.Cognito.initialize(Cognito.kt:22)
I/flutter (16510): at java.lang.reflect.Method.invoke(Native Method)
I/flutter (16510): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createPluginScaffold$1$$special$$inlined$let$lambda$1.invoke(PluginScaffoldPlugin.kt:75)
I/flutter (16510): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createPluginScaffold$1$$special$$inlined$let$lambda$1.invoke(Unknown
I/flutter (16510): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
I/flutter (16510): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
I/flutter (16510): <asynchronous suspension>
I/flutter (16510): #2 Cognito.invokeMethodWithChannel (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:70:30)
I/flutter (16510): #3 Cognito.invokeMethod (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:86:12)
I/flutter (16510): #4 Cognito.initialize (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:107:11)
I/flutter (16510): #5 MyAppState.doLoad (package:flutter_cognito_plugin_example/main.dart:30:29)
I/flutter (16510): #6 MyAppState.initState (package:flutter_cognito_plugin_example/main.dart:54:5)
I/flutter (16510): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
I/flutter (16510): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter (16510): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter (16510): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
This then stops initialization within the app and once the user tries to install the apk on an android device, they get a MissingPluginException from flutter. This also occurs currently in the example app when being installed.
Hello, this is really a question more than an issue. I need to pick up a critical bug fix that went into the latest version 2.18.1 of the iOS SDK for Cognito -- https://github.com/aws-amplify/aws-sdk-ios/blob/main/CHANGELOG.md
The bug fix I need is here -- aws-amplify/aws-sdk-ios#2886
The PR is here -- aws-amplify/aws-sdk-ios#3190
The bug impacts iOS only, not Android.
It looks like the current podpsec for flutter_cognito_plugin points to version 2.13, so this will be a big jump to 2.18:
s.dependency 'AWSMobileClient', '~> 2.13.0'
s.dependency 'AWSAuth', '~> 2.13.0'
s.dependency 'AWSCognito', '~> 2.13.0'
s.dependency 'AWSAuthUI', '~> 2.13.0'
s.dependency 'AWSUserPoolsSignIn', '~> 2.13.0'
I can open a PR and run the example app, but is there is any other recommendation on process to do the upgrade?
Thanks in advance for your help, and thanks again for the great library.
hi i got the following error
package identifier or launch activity not found.
Please check /home/flow/prj/testaws/android/app/src/main/AndroidManifest.xml for errors.
No application found for TargetPlatform.android_x64.
Is your project missing an android/app/src/main/AndroidManifest.xml?
Consider running "flutter create ." to create one.
MainActivity
package com.example.testaws
import androidx.annotation.NonNull
import com.pycampers.flutter_cognito_plugin.CognitoPluginActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: CognitoPluginActivity("testaws") {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testaws">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="testaws"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="testaws" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
@objc func currentUserState() {
self.result!(awsClient.currentUserState)
}
I having a problem with security requirements of my app, because any time i call the signIn method the user credentials are logged by invoke method in debug console and in android logcat.
Is there any way to disable this behavior, because it is preventing my release.
This is an example of what is shown:
PluginScaffold D invoke { channel: com.pycampers.flutter_cognito_plugin, method: signIn(), args: {password=PASSWORD123, username=USERNAME} }
One nice feature would be to allow once you login with a user, to be able to attach the user to an specific group.
Right now with the current version of the library, I am not sure how to do it.
This is a functionality I would be quite happy to have, and I could collaborate into it.
The idea is to use this functionality:
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminAddUserToGroup-property
D/PluginScaffold: invoking { channel: com.pycampers.flutter_cognito_plugin, method: signIn(), args: Optional({
password = 123456;
username = "[email protected]";
}) }
D/PluginScaffold: piping exception to flutter (Cannot set the result on a completed task.
(
0 CoreFoundation 0x00000001942a6768 4FBDF167-161A-324C-A233-D516922C67E5 + 1218408
1 libobjc.A.dylib 0x00000001a8d6d7a8 objc_exception_throw + 60
2 CoreFoundation 0x000000019419b7e0 4FBDF167-161A-324C-A233-D516922C67E5 + 124896
3 AWSMobileClient 0x0000000100cb08fc $s15AWSMobileClientAAC6signIn8username8password14validationData17completionHandlerySS_SSSDyS2SGSgyAA04SignD6ResultVSg_s5Error_pSgtctF + 1236
4 flutter_cognito_plugin 0x000000010caa2818 $s22flutter_cognito_plugin7CognitoC6signIn4call6resultySo17FlutterMethodCallC_yypSgctF + 636
5 flutter_cognito_plugin 0x000000010caa8770 $sSo17FlutterMethodCallCypSgIegn_Ieggg_ABxq_r0_lyACytIsegnr_ytIegnnr_TRTA + 88
6 plugin_scaffold 0x000000010cb31f54 $s15plugin_scaffold20createPluginScaffold9messenger11channelName9methodMapSo20FlutterMethodChannelCSo0K15BinaryMessenger_p_SSSDySSypGtFySo0kL4CallC_yypSgctcfU_yycfU_TA + 4532
7 plugin_scaffold 0x000000010cb30834 $s15plugin_scaffold11catchErrorsyyyypSgc_yyKctFyycfU_TA + 44
8 plugin_scaffold 0x000000010cb2f9a4 $sIeg_IeyB_TR + 20
9 plugin_scaffold 0x000000010cb2ed9c +[PluginScaffoldHelper tryCatch:onCatch:onElse:]
Can the changePassword(String oldPassword, String newPassword)
method be used to update a user's password when their SignInState is SignInState.NEW_PASSWORD_REQUIRED?
The plugin works fine if using the android emulator, however once generating an apk using "flutter build apk", an exception is thrown where it cannot find the corresponding plugin. I have tested other plugins and it seems that this is the only one that is not working in this manner.
This problem does not occur with iOS.
So I can log in to a user account, but when I do anything with AppSync, the UserState will change to UserState.SIGNED_OUT
I already gave up and switched to another plugin that does not have this problem.
Is there a way to allow un-authorized users for read-only operations?
Similar to -> aws-amplify/amplify-js#711
const client = new AWSAppSyncClient({
url: AppSync.graphqlEndpoint,
region: AppSync.region,
auth: {
// Amazon Cognito Federated Identities using AWS Amplify
credentials: () => Auth.currentCredentials()
},
});
I'm trying social login at iOs but when I done login with google and then callback to my application the additionalInfo is null without token, this work fina at Android.
dependencies:
flutter:
sdk: flutter
amplify_flutter: ^0.2.0
amplify_auth_cognito: ^0.2.0
$ flutter --version
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (3 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
try {
var res = await Amplify.Auth.signInWithWebUI(
provider: AuthProvider.google);
print(res);
print(
'TOKEN: ${res.nextStep?.additionalInfo['token'] ?? ''}');
} on AmplifyException catch (e) {
print(e.message);
} catch (e) {
print(e);
}
Hi, I am trying to integrate aws with firebase as an identity provider. On flutter side I am using the firebase_auth package with the following code:
FirebaseUser user = await FirebaseAuth.instance.currentUser();
String fb_token;
user.getIdToken().then((result) {
fb_token = result.token;
});
Now I am trying to connect to aws via an Identity pool. I am following the approach outlined in this SO post: https://stackoverflow.com/questions/47228334/firebase-as-identity-provider-with-cognito-aws/47252192
But so far I haven't had any luck finding a dart package that would support connecting to cognito with openId and identity pools. Does this package also support identity pools or only user pools? Do you have any other suggestions/advice on how to solve this problem or am I perhaps missing something?
Many thanks!
Hi,
I'm using this code
var res = await Cognito.federatedSignIn('accounts.google.com', token.idToken);
and I receive error "Token is not from a supported provider of this identity pool" but I've checked my user pool>Identity provider and identity pool>authentication provider both are configured.
May I know what might be the reason that I'm getting this error?
Do I need to add google info into the awsconfiguration.json as well?If yes can anyone please show me the sample. Thanks!
Below are the awsconfiguration.json sample I'm using
{
"IdentityManager": {
"Default": {}
},
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab",
"Region": "XX-XXXX-X"
}
}
},
"CognitoUserPool": {
"Default": {
"PoolId": "XX-XXXX-X_abcd1234",
"AppClientId": "XXXXXXXX",
"AppClientSecret": "XXXXXXXXX",
"Region": "XX-XXXX-X"
}
}
}
Hello flutter cognito plugin team! Would you mind helping me with something? When I want to call a hosted UI using
Cognito.showSignIn(
identityProvider: "google",
scopes: ["email", "openid"],
);
I get this error:
D/AWSMobileClient(18123): getHostedUIJSON: Failed to read config
D/AWSMobileClient(18123): java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONObject com.amazonaws.mobile.config.AWSConfiguration.optJsonObject(java.lang.String)' on a null object reference
D/AWSMobileClient(18123): at com.amazonaws.mobile.client.AWSMobileClient.getHostedUIJSONFromJSON(AWSMobileClient.java:641)
D/AWSMobileClient(18123): at com.amazonaws.mobile.client.AWSMobileClient.getHostedUIJSON(AWSMobileClient.java:660)
D/AWSMobileClient(18123): at com.amazonaws.mobile.client.AWSMobileClient.getHostedUIJSON(AWSMobileClient.java:655)
D/AWSMobileClient(18123): at com.amazonaws.mobile.client.AWSMobileClient._showSignIn(AWSMobileClient.java:2679)
D/AWSMobileClient(18123): at com.amazonaws.mobile.client.AWSMobileClient.showSignIn(AWSMobileClient.java:2659)
D/AWSMobileClient(18123): at com.pycampers.flutter_cognito_plugin.Cognito.showSignIn(Cognito.kt:236)
D/AWSMobileClient(18123): at java.lang.reflect.Method.invoke(Native Method)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createPluginScaffold$1$$special$$inlined$let$lambda$1.invoke(PluginScaffoldPlugin.kt:78)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createPluginScaffold$1$$special$$inlined$let$lambda$1.invoke(Unknown Source:0)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt.catchErrors(PluginScaffoldPlugin.kt:172)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt.catchErrors(PluginScaffoldPlugin.kt:179)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createMethodWrapper$2$1.invoke(PluginScaffoldPlugin.kt:132)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.PluginScaffoldPluginKt$createMethodWrapper$2$1.invoke(Unknown Source:0)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.DoAsync.doInBackground(PluginScaffoldPlugin.kt:287)
D/AWSMobileClient(18123): at com.pycampers.plugin_scaffold.DoAsync.doInBackground(PluginScaffoldPlugin.kt:281)
D/AWSMobileClient(18123): at android.os.AsyncTask$3.call(AsyncTask.java:378)
D/AWSMobileClient(18123): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
D/AWSMobileClient(18123): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
D/AWSMobileClient(18123): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
D/AWSMobileClient(18123): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
D/AWSMobileClient(18123): at java.lang.Thread.run(Thread.java:919)
and then
E/flutter (18123): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(java.lang.Exception, showSignIn called with HostedUI options in awsconfiguration.json, java.lang.Exception: showSignIn called with HostedUI options in awsconfiguration.json
E/flutter (18123): at com.amazonaws.mobile.client.AWSMobileClient$23.run(AWSMobileClient.java:2684)
E/flutter (18123): at com.amazonaws.mobile.client.internal.InternalCallback$1.run(InternalCallback.java:101)
E/flutter (18123): at java.lang.Thread.run(Thread.java:919)
E/flutter (18123): )
E/flutter (18123): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (18123): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:163:17)
E/flutter (18123): <asynchronous suspension>
E/flutter (18123): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:337:12)
E/flutter (18123): #3 Cognito.invokeMethodWithChannel (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:75:36)
E/flutter (18123): #4 Cognito.invokeMethod (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:92:12)
E/flutter (18123): #5 Cognito.showSignIn (package:flutter_cognito_plugin/flutter_cognito_plugin.dart:294:11)
And, my awsconfig.json is as follows:
{
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"PoolId": "XX-XXXX-X_abcd1234",
"AppClientId": "XXXXXXXX",
"AppClientSecret": "XXXXXXXXX",
"Region": "XX-XXXX-X"
}
},
"Auth": {
"Default": {
"OAuth": {
"WebDomain": "XXX.auth.ap-south-1.amazoncognito.com",
"AppClientId": "XXXXXXXX",
"SignInRedirectURI": "myapp://callback",
"SignOutRedirectURI": "myapp://signout",
"Scopes": ["email"]
}
}
}
}
Am I doing something wrong?
My current app has 2 different user pools for production and development. Is there any way to configure awsconfiguration.json seperately? Thank you!
Maintenance suggestions
The package description is too short. (-20 points)
Hi
I am trying to build your example app but when I did, confronted with the following error. What have I done wrong?
xxxxx\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:17: error: package com.pycampers.flutter_cognito_plugin does not exist
com.pycampers.flutter_cognito_plugin.FlutterCognitoPlugin.registerWith(shimPluginRegistry.registrarFor("com.pycampers.flutter_cognito_plugin.FlutterCognitoPlugin"));
^
1 error
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 36s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 37.4s
Gradle task assembleRelease failed with exit code 1
I tryed generete my apk folowing Flutter Tutorial and now my app is broken.
I don't understood the error...
D/PluginScaffold( 7236): invoke { channel: com.pycampers.flutter_cognito_plugin, method: isSignedIn(), args: null }
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = provider
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = token
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = cognitoIdentityId
E/AWSKeyValueStore( 7236): com.amazonaws.internal.keyvaluestore.KeyNotFoundException: Error occurred while accessing AndroidKeyStore to retrieve the key for keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
I/AWSKeyValueStore( 7236): Deleting the encryption key identified by the keyAlias: com.amazonaws.mobile.client.aesKeyStoreAlias
E/AWSKeyValueStore( 7236): Error in retrieving the decryption key used to decrypt the data from the persistent store. Returning null for the requested dataKey = isFederationEnabled
D/AWSMobileClient( 7236): Inspecting user state details
pleas help-me
My app is running fine on --debug mode and as well as --release mode but when i am generating a apk of the project and trying to use the plugin functions I got this error:
MissingPluginException(No implementation found for method attachPolicy on channel com.scientifichackers.aws_iot)
Can anyone please let me about this, I am stuck on this from last 2 days and this is the only error needed to be resolved in my project
Currently using the latest flutter_cognito_plugin
from git and flutter_facebook_login: 3.0.0
for the facebook login function. Here is my code.
facebookLogin.logIn(['public_profile', 'email']).then((result) {
print(result.accessToken.token);
// passing user access token into the token field
Cognito.federatedSignIn("Facebook", result.accessToken.token)
.then((res) {
print(res);
c.complete(res);
});
}).catchError((error) {
c.completeError(error);
});
Error that I am getting
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(com.amazonaws.services.cognitoidentity.model.NotAuthorizedException, Invalid login token. Not a valid OpenId Connect identity token. (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: NotAuthorizedException; Request ID: a6f64c73-244b-452c-a869-0d207582b254), com.amazonaws.services.cognitoidentity.model.NotAuthorizedException: Invalid login token. Not a valid OpenId Connect identity token. (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: NotAuthorizedException; Request ID: a6f64c73-244b-452c-a869-0d207582b254)
Maybe I have overseen that. I like to to the refrresh token to get a new access token. Is there already an API?
When running the app for my android. I got the flutter output:
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.
NotAuthorizedException: Unable to verify secret hash for client 6npouauc8jt1fioujvblmvpise (Service: AmazonCognitoIdentityProvider; Status Code: 400; Error Code: NotAuthorizedException; Request ID: f964a2df-abf4-4750-bb9d-a731f63d82ad)
I/flutter (16710): com.amazonaws.services.cognitoidentityprovider.model.NotAuthorizedException: Unable to verify secret hash for client 6npouauc8jt1fioujvblmvpise (Service: AmazonCognitoIdentityProvider; Status Code: 400; Error Code: NotAuthorizedException; Request ID: f964a2df-abf4-4750-bb9d-a731f63d82ad)
To get Id_token or user_token we need to call the getToken method but the pipeline for this is not available yet appearantly.
Thread 26: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/user/FlutterHome/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_aws_amplify_cognito-1.0.0+7/ios/Classes/SwiftFlutterAwsAmplifyCognito.swift, line 275
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.