Open balajiks-dev opened 1 year ago
Hi @balajiks-dev thank you for the callout around the lack of documentation regarding the amplifyconfiguration file. The amplifyconfiguration file is parsed by the libraries into the AmplifyConfig
type exported from package:amplify_flutter
. If you'd prefer a typed interface, I would recommend creating a config this way then calling jsonEncode(config)
to get the string expected by Amplify.configure
.
There are some examples of building AmplifyConfig
objects scattered throughout the library. We are also working on adding helper classes to the category configs, like AuthConfig.cognito
to try and make it even easier. Although, this work is only happening in our dev-preview (v1.0.0-0
) versions of the library.
Hope this helps!
Hi @dnys1 Thank you for your message. Hope it will be solved in the documentation for better understandable.
I recognize that documentation for this is still missing for this. However, I am marking this as a feature request as we are currently investigating ways that we can improve the experience around this (in addition to docs updates)
I have another problem with this file, as I cannot get it generated with CI. Should I create a seperate issue for that? I am using this script (Left out personal details)
FLUTTERCONFIG="{\
\"ResDir\":\"lib\",\
\"SourceDir\":\"lib\",\
\"DistributionDir\":\"build\",\
\"BuildCommand\":\"flutter build web\",\
\"StartCommand\":\"flutter run -d chrome\"\
}"
FRONTEND="{\
\"frontend\":\"flutter\",\
\"framework\":\"flutter\",\
\"config\":$FLUTTERCONFIG\
}"
PROVIDERS="{\
\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG\
}"
amplify pull \
--frontend $FRONTEND \
--amplify $AMPLIFY \
--providers $PROVIDERS \
--yes
But this does not generate the file for me, even though it is generated when I use the interactive version of the CLI. What am I doing wrong?
FYI - Documentation on existing resources can now be found on the "Existing Resources" tab here: https://docs.amplify.aws/flutter/build-a-backend/auth/set-up-auth/#set-up-backend-resources
@Jordan-Nelson I think it will be useful now. Thanks for your support!
Description
Hey Devs, I have to write amplifyconfiguration.dart file manually without doing amplify configure in my Flutter Project. My Flutter Project using AWS Cognito for SignUp and SignIn. I only have AppId, Pool Id and Region. How can i able to achieve it.
Thanks
Categories
Steps to Reproduce
No response
Screenshots
No response
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
N/A
OS
MacOS
Deployment Method
Amplify CLI
CLI Version
No response
Additional Context
No response
Amplify Config
var json = { "CognitoUserPool": { "Default": {"PoolId": "us-west-1", "AppClientId": "APP ID", "Region": "REGION"} } };